Tutorial by Topics: measure

Units at Runtime Units of Measure are used only for static checking by the compiler, and are not available at runtime. They cannot be used in reflection or in methods like ToString. For example, C# gives a double with no units for a field of type float<m> defined by and exposed from an ...
class Meter(val meters: Double) extends AnyVal type Meter = Double It is recommended to use value classes for units or a dedicated library for them.

Page 1 of 1