Mul
Immutable measurement representing the product of two units.
This class represents values like torque (Newton-meters), energy (kilowatt-hours), or any other quantity that is the product of two units.
Properties
Absolute value of measure.
Gets the magnitude of this measure in terms of the base unit. If the unit is the base unit for its system of measure, then the value will be equivalent to magnitude.
Functions
Divides this measure by another measure and returns the ratio as a dimensionless value.
Divides this measure by another measure of a different type to create a ratio unit. For example, Distance / Time creates a velocity measurement, or Voltage / Distance creates electric field strength.
Divides this measure by a scalar and returns the result.
Checks if this measure is equivalent to another measure of the same unit.
Checks if this measure is near another measure of the same unit. Provide a variance threshold for use for a +/- scalar, such as 0.05 for +/- 5%.
Checks if this measure is near another measure of the same unit, with a specified tolerance of the same unit.
Returns a measure equivalent to this one equal to zero minus its current value. For non-linear unit types like temperature, the zero point is treated as the zero value of the base unit (eg Kelvin). In effect, this means code like Celsius.of(10).negate() returns a value equivalent to -10 Kelvin, and not -10° Celsius.
Multiplies this measure by another measure of a different type to create a compound unit. For example, Distance * Distance creates an area measurement, or Voltage * Time creates charge.
Multiplies this measure by a scalar unitless multiplier.
Returns a string representation of this measurement in a longhand form. The name of the backing unit is used, rather than its symbol, and the magnitude is represented in a full string, not scientific notation. (Very large values may be represented in scientific notation, however)
Returns a string representation of this measurement in a shorthand form. The symbol of the backing unit is used, rather than the full name, and the magnitude is represented in scientific notation.
Returns a measure equivalent to this one equal to zero minus its current value.
Take the sign of another measure. This measure's and the provided measure's signs are considered in this measure's unit.
Take the sign of another measure.