Skip to content
FutureBlitz

    Install

    Import std.math.numbers

    Bounded

    std.math.numbers

    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)

    std/math/numbers.fb, line 94

    • Static Method MinValue(): Self static method #

      The type's lowest value: a float's lowest finite one.

    • Static Method MaxValue(): Self static method #

      The type's highest value: a float's highest finite one.

    • Static Method DoubleValue(value: Self): Float64 static method #

      The value as 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.