BigFixed.opCmp

Implements 3-way comparisons of BigFixed with BigFixed or BigFixed with built-in integers.

  1. int opCmp(BigFixed y)
  2. int opCmp(T y)
    struct BigFixed
    pure nothrow const
    int
    opCmp
    (
    T
    )
    (
    T y
    )
    if (
    isIntegral!T
    )

Examples

immutable x = BigFixed(100, 10);
immutable y = BigFixed(10, 10);
immutable int z = 50;
const int w = 200;

assert(y < x);
assert(x > z);
assert(z > y);
assert(x < w);

Meta