Unit Builder
Builder used for easily deriving new units from existing ones. When deriving a new unit, the base unit class must redeclare the constructor (U, UnaryFunction, UnaryFunction, String, String). The unit builder class will invoke this constructor automatically and build the new unit. Alternatively, new units can be derived by passing an explicit constructor function to make.
Since
1.0.0-pre
Parameters
<U>
the type of the unit
Constructors
Types
Functions
Link copied to clipboard
Helper for defining units that are a scalar multiple of the base unit, such as kilometers being 1000x of the base unit (meters).
Link copied to clipboard
Sets the conversion function to transform values in the base unit to values in the derived unit.
Link copied to clipboard
Link copied to clipboard
Defines a mapping for values within the given input range.
Link copied to clipboard
Sets the name of the new unit.
Link copied to clipboard
Sets the unit conversions based on a simple offset.
Link copied to clipboard
Helper for defining units that are a scalar fraction of the base unit, such as centimeters being 1/100th of the base unit (meters).
Link copied to clipboard
Sets the symbol of the new unit.
Link copied to clipboard
Sets the conversion function to transform values in the derived unit to values in the base unit.