Import std.math.numbers
Bounded
interface
Public Interface Bounded
The types with a lowest and a highest value: every number type. A float's are its lowest and highest finite values, not the infinities. Each is a Double too, for math like a Mean.
Examples
Function Highest<T: Bounded>(): T => MaxValue<T>()
Expect(Highest<UInt16>() == 65535)
Expect(Highest<Int8>() == 127)-
The type's lowest value: a float's lowest finite one.
-
The type's highest value: a float's highest finite one.
-
The
valueas a Double, rounded to the nearest one where a Long's is too large to hold.
Report an issue with this page or with FutureBlitz on GitHub.