Torque
Immutable measurement of torque.
This class represents torque values like newton-meters, pound-feet, etc. It supports arithmetic operations and conversions between different torque units.
Properties
Absolute value of measure.
A convenience method to get the base unit of the measurement. Equivalent to unit.baseUnit.
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.
Gets the units of this measure.
Functions
Absolute value of measure.
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.
Divides this torque by a distance (moment arm) to get force.
Converts this measure to a measure with a different unit of the same type, eg minutes to seconds. Converting to the same unit is equivalent to calling magnitude.
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.
Subtracts another measure of the same unit type from this one.
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.
Adds another measure of the same unit type to this one.
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.
Multiplies this torque by an angular velocity to get power.
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. 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).unaryMinus() returns a value equivalent to -10 Kelvin, and not -10° Celsius.
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.