DistanceUnit
Unit of measurement for distance/length.
Supported units include meters (base unit), millimeters, centimeters, kilometers, inches, feet, yards, and miles.
Constructors
Properties
Functions
Checks if this unit is equivalent to another one. Equivalence is determined by both units having the same base type and treat the same base unit magnitude as the same magnitude in their own units, to within Measure.EQUIVALENCE_THRESHOLD.
Converts a value in terms of base units to a value in terms of this unit.
Checks if this unit is the base unit for its own system of measurement.
Creates a new immutable measurement of the given magnitude in terms of this unit's base unit.
Gets a measure with a magnitude of 1.0 in terms of this unit. The returned object is guaranteed to be of the same type returned by of. Subclasses are encouraged to override this method to sharpen the return type.
Combines this unit with a unit of time to create a velocity unit.
Converts a value in terms of this unit to a value in terms of the base unit.
Gets a measure of zero magnitude in terms of this unit. The returned object is guaranteed to be of the same type returned by of. Subclasses are encouraged to override this method to sharpen the return type.