Inner Drive Extensible Architecture

## Mass Structure |

Represents the constant value relating to acceleration
and force in a physical object.

Inheritance Hierarchy

Syntax

C#

[SerializableAttribute] [JsonObjectAttribute(ItemTypeNameHandling = TypeNameHandling.Auto)] public struct Mass : IAdditionOperators<Mass, Mass, Mass>, IAdditionOperators<Mass, double, Mass>, IAdditionOperators<Mass, int, Mass>, ICloneable, IComparable, IComparable<Mass>, IComparisonOperators<Mass, Mass, bool>, IEqualityOperators<Mass, Mass, bool>, IComparisonOperators<Mass, double, bool>, IEqualityOperators<Mass, double, bool>, IConvertible<Mass>, IDivisionOperators<Mass, double, Mass>, IDivisionOperators<Mass, int, Mass>, IEquatable<Mass>, IMeasurable, IFormattable, IMinMaxValue<Mass>, IMultiplyOperators<Mass, double, Mass>, IMultiplyOperators<Mass, int, Mass>, ISubtractionOperators<Mass, Mass, Mass>, ISubtractionOperators<Mass, double, Mass>, ISubtractionOperators<Mass, int, Mass>, IUnaryNegationOperators<Mass, Mass>, ISpanFormattable

The Mass type exposes the following members.

Constructors

Name | Description | |
---|---|---|

Mass(Double) | Creates a new instance of Mass with a particular value. | |

Mass(Double, Type) | Creates a new instance of Mass with a particular value and Unit whose Type is specified | |

Mass(Double, Unit, MetricExponent) | Creates a new instance of Mass with a particular value and Unit assuming that value is already raised or lowered to the power of exponent. |

Properties

Name | Description | |
---|---|---|

Accuracy | Represents the degree confidence that the quantity represented equals the quantity actually measured, controlling how the CompareTo<T> method behaves. | |

DefaultUnit |
Gets the Type of the Unit in which the
IMeasurableclass is denominated.
| |

MaxValue | Gets the maximum value of the current type. | |

MinValue | Gets the minimum value of the current type. | |

Name | Gets the name of the type of measurement. | |

Precision | Represents the range within which the measurement is correct, controlling how the ToString() method behaves. | |

Unit | Gets the Unit in which the IMeasurable object is denominated. | |

Value | Gets or sets the quantity of units represented by the IMeasurable object. |

Methods

Name | Description | |
---|---|---|

Add(Mass, Mass) | Adds two instances of Mass together. | |

Add(Mass, Double) | Adds an instance of Mass to an instance of Double. | |

Clone | Creates a new object that is a copy of the current instance. | |

CompareTo | Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. | |

ConvertTo(Type) | Converts the instance into a new IMeasurable instance denominated in the measurement units provided. | |

ConvertTo(Unit) | Converts the instance into a new instance of the same type denominated in the measurement units provided. | |

Divide | Divides an instance of Mass by a double-precision value. | |

Equals(Mass) | Indicates whether the current object is equal to another object of the same type. | |

Equals(Object) |
Determines whether the specified Object is equal to the
current Mass.
(Overrides ValueTypeEquals(Object)) | |

Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |

GetHashCode |
Serves as a hash function for a particular type,
suitable for use in hashing algorithms and data structures
like a hash table.
(Overrides ValueTypeGetHashCode) | |

GetType | Gets the Type of the current instance. (Inherited from Object) | |

IsInfinity | Returns a value indicating whether the specified number evaluates to negative or positive infinity. | |

IsNaN | Returns a value indicating whether the specified number evaluates to a value that is not a number (NaN). | |

IsNegativeInfinity | Returns a value indicating whether the specified number evaluates to negative infinity (NegativeInfinity). | |

IsPositiveInfinity | Returns a value indicating whether the specified number evaluates to positive infinity (PositiveInfinity). | |

MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |

Multiply | Multiplies an instance of Mass by a double-precision value. | |

Negate | Negates the value of the specified Mass operand. | |

Subtract(Mass, Mass) | Subtracts one instance of Mass from another. | |

Subtract(Mass, Double) | Subtracts an instance of Double from an instance of Mass. | |

ToString |
Gets the string representation of this Mass.
(Overrides ValueTypeToString) | |

ToString(MetricExponent) | Converts the numeric value of this instance to its equivalent String representation, using the metric exponent provided if appropriate to the Unit type. | |

ToString(String) | Converts the numeric value of this instance to its equivalent String representation, using the specified format. | |

ToString(String, MetricExponent) | Converts the numeric value of this instance to its equivalent String representation, using the specified format and metric exponent. | |

ToString(String, IFormatProvider) | Formats the value of the current instance using the specified format. | |

ToString(String, MetricExponent, IFormatProvider) | Formats the value of the current instance using the specified format. | |

TryFormat | Tries to format the value of the current instance into the provided span of characters. |

Operators

Name | Description | |
---|---|---|

Addition(Mass, Mass) | Adds two values together to compute their sum. | |

Addition(Mass, Double) | Adds two values together to compute their sum. | |

Addition(Mass, Int32) | Adds two values together to compute their sum. | |

Division(Mass, Double) | Divides one value by another to compute their quotient. | |

Division(Mass, Int32) | Divides one value by another to compute their quotient. | |

Equality(Double, Mass) | Compares an instance of Mass with an instance of Double for equality. | |

Equality(Mass, Mass) | Compares two values to determine equality. | |

Equality(Mass, Double) | Compares an instance of Mass with an instance of Double for equality. | |

GreaterThan(Double, Mass) | Compares an instance of Mass to an instance of Double for different values. | |

GreaterThan(Mass, Mass) | Compares two values to determine which is greater. | |

GreaterThan(Mass, Double) | Compares two values to determine which is greater. | |

GreaterThanOrEqual(Double, Mass) | Compares an instance of Mass to an instance of Double for different values. | |

GreaterThanOrEqual(Mass, Mass) | Compares two values to determine which is greater or equal. | |

GreaterThanOrEqual(Mass, Double) | Compares two values to determine which is greater or equal. | |

(Double to Mass) | Creates a new Mass object from a Double value. | |

(Mass to Double) | Creates a new Double value from a given Mass object. | |

Inequality(Double, Mass) | Compares an instance of Mass with an instance of Double for inequality. | |

Inequality(Mass, Mass) | Compares two values to determine inequality. | |

Inequality(Mass, Double) | Compares an instance of Mass with an instance of Double for inequality. | |

LessThan(Double, Mass) | Compares an instance of Mass to an instance of Double for different values. | |

LessThan(Mass, Mass) | Compares two values to determine which is less. | |

LessThan(Mass, Double) | Compares two values to determine which is less. | |

LessThanOrEqual(Double, Mass) | Compares an instance of Mass to an instance of Double for different values. | |

LessThanOrEqual(Mass, Mass) | Compares two values to determine which is less or equal. | |

LessThanOrEqual(Mass, Double) | Compares two values to determine which is less or equal. | |

Multiply(Mass, Double) | Multiplies two values together to compute their product. | |

Multiply(Mass, Int32) | Multiplies two values together to compute their product. | |

Subtraction(Mass, Mass) | Subtracts two values to compute their difference. | |

Subtraction(Mass, Double) | Subtracts two values to compute their difference. | |

Subtraction(Mass, Int32) | Subtracts two values to compute their difference. | |

UnaryNegation(Mass) | Computes the unary negation of a value. |

Fields

Name | Description | |
---|---|---|

Epsilon | Represents the smallest value of Accuracy that will successfully evaluate equality without boundary condition errors. | |

MaxPrecision | Represents the maximum precision with which a value can be displayed. | |

MinPrecision | Represents the minimum precision with which a value can be displayed. |

Explicit Interface Implementations

Name | Description | |
---|---|---|

IComparableCompareTo | Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. |

Remarks

Measurable objects are generally immutable structures. Thus,
the properties of measurable objects expose property get methods
only. The exceptions—Accuracy and Precision—do
not change the underlying value of the measurement, only its behavior; therefore
these members may be changed as needed after the measurement is instantiated.

See Also