Dimensionful |
public struct DimensionfulQuantity : IComparable, IComparable<DimensionfulQuantity>, IEquatable<DimensionfulQuantity>, IFormattable
The DimensionfulQuantity type exposes the following members.
| Name | Description | |
|---|---|---|
| DimensionfulQuantity(Double) | Creates a dimensionless quantity with the provided value. | |
| DimensionfulQuantity(Double, IPrefixedUnit) | Creates a quantity with the provided value in the given prefixed unit. | |
| DimensionfulQuantity(Double, IUnit) | Creates a quantity with the provided value in the given unit. | |
| DimensionfulQuantity(Double, SIPrefix, IUnit) | Creates a quantity with the provided value in the given prefixed unit. |
| Name | Description | |
|---|---|---|
| AsQuantityInSIUnits | Gets this quantity in SI units (without prefix). | |
| AsValueInSIUnits | Converts this quantity to its numerical value in SI units (without prefix). | |
| Empty | Gets an empty, i.e. uninitialized, quantity. | |
| HasBiasedUnit | Gets a value indicating whether this instance has a biased unit (i.e. a unit implementing IBiasedUnit. | |
| IsEmpty | Gets a value indicating whether this instance is empty. It is empty if no unit has been associated so far with this instance. | |
| Prefix | Gets the SI prefix of this quantity. | |
| PrefixedUnit | Gets the prefixed unit of this quantity. | |
| TreatedAsUnbiasedDifference | Gets the quantity as treated as unbiased difference value. If the unit of this quantity is not biased, the return value is exactly this quantity. But if the unit is biased, the return value is the difference of this quantity and the same quantity with zero value. Example: 20 °C will transform to 20 K, because 20°C - 0 °C = 20 K. | |
| Unit | Gets the unit of this quantity. | |
| Value | Gets the numeric value of this quantity in the context of prefix and unit. |
| Name | Description | |
|---|---|---|
| Abs | Get the absolute value of this quantity. | |
| Abs(DimensionfulQuantity) | Gets the absolute value of the specified quantity. | |
| AsQuantityIn(IPrefixedUnit) | Converts this quantity to another quantity in the provided prefixed unit. | |
| AsQuantityIn(IUnit) | Converts this quantity to another quantity in the provided unit (without prefix). | |
| AsQuantityIn(SIPrefix, IUnit) | Converts this quantity to another quantity in the provided unit, with the provided prefix. | |
| AsValueIn(IPrefixedUnit) | Converts this quantity to its numerical value in the given unit, with the given prefix. | |
| AsValueIn(IUnit) | Converts this quantity to its numerical value in the given unit (without prefix). | |
| AsValueIn(SIPrefix, IUnit) | Converts this quantity to its numerical value in the given unit, with the given prefix. | |
| CompareTo(DimensionfulQuantity) | Compares this quantity to another quantity. | |
| CompareTo(Object) | 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. | |
| Equals(DimensionfulQuantity) | Indicates whether the current object is equal to another object of the same type. | |
| Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object)) | |
| GetHashCode | Returns the hash code for this instance. (Overrides ValueTypeGetHashCode) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| IsEqualInValuePrefixUnit | Determines whether this instance is equal to another quantity in all three components (value, prefix and unit). This is not a comparison for the physical equality of the quantities. | |
| Max | Returns the larger of two quantities. | |
| Min | Returns the smaller of two quantities. | |
| RoundUpOrDown | Rounds a quantity to the nearest multiple of another quantity. | |
| ToString | Returns the fully qualified type name of this instance. (Overrides ValueTypeToString) | |
| ToString(String, IFormatProvider) | Formats the value of the current instance using the specified format. | |
| WithNewValue | Creates an instance with a new value, and with the same prefix and unit as this quantity. |
| Name | Description | |
|---|---|---|
| Addition(DimensionfulQuantity, DimensionfulQuantity) | Adds two quantities. | |
| Division(DimensionfulQuantity, DimensionfulQuantity) | Divides one quantity by another quantity. | |
| Division(DimensionfulQuantity, Double) | Divides a quantity by a scalar. | |
| Division(Double, DimensionfulQuantity) | Divides a scalar by a quantity. | |
| Equality(DimensionfulQuantity, DimensionfulQuantity) | Determines whether two quantities are equal in all components. | |
| GreaterThan(DimensionfulQuantity, DimensionfulQuantity) | Determines whether one quantity is greater than another quantity. | |
| GreaterThanOrEqual(DimensionfulQuantity, DimensionfulQuantity) | Determines whether one quantity is greater than or equal to another quantity. | |
| Inequality(DimensionfulQuantity, DimensionfulQuantity) | Determines whether two quantities are not equal in any component. | |
| LessThan(DimensionfulQuantity, DimensionfulQuantity) | Determines whether one quantity is less than another quantity. | |
| LessThanOrEqual(DimensionfulQuantity, DimensionfulQuantity) | Determines whether one quantity is less than or equal to another quantity. | |
| Multiply(DimensionfulQuantity, DimensionfulQuantity) | Multiplies two quantities. | |
| Multiply(DimensionfulQuantity, Double) | Multiplies a quantity by a scalar. | |
| Multiply(Double, DimensionfulQuantity) | Multiplies a scalar by a quantity. | |
| Subtraction(DimensionfulQuantity, DimensionfulQuantity) | Implements the subtraction operator. Here, the intended operation is ambiguous if we subtract a biased unit and an unbiased unit. The result can be treated either as biased or unbiased. For example: 20°C minus 20 Kelvin. The result is either 293.15 K - 20 K = 273.15 K or 20°C - 20 K = 0 °C (biased). Although the same, this results in difficulties if subsequently rates are calculated from this result. Because of that, the decision was made to treat the result as unbiased value. | |
| UnaryNegation(DimensionfulQuantity) | Negates a quantity. |
| Name | Description | |
|---|---|---|
| CheckUnitCompatibleWith |
Checks whether the quantity x has the expected expectedUnit, and if not, throws an ArgumentException.
(Defined by DimensionfulQuantityExtensions) |