totalOrderAbs

Checks the order between two _decimal values

  1. bool totalOrder(D1 x, D2 y)
  2. bool totalOrderAbs(D1 x, D2 y)
    @IEEECompliant("totalOrderAbs", 25)
    bool
    totalOrderAbs
    (
    D1
    D2
    )
    (
    auto const ref D1 x
    ,
    auto const ref D2 y
    )
    if (
    isDecimal!(D1, D2)
    )

Parameters

x D1

a _decimal value

y D2

a _decimal value

Return Value

Type: bool

true if x precedes y, false otherwise Notes: totalOrderAbs checks the order between |x| and |y|

Examples

assert (totalOrder(decimal32.min_normal, decimal64.max));
assert (!totalOrder(decimal32.max, decimal128.min_normal));
assert (totalOrder(-decimal64(0), decimal64(0)));
assert (totalOrderAbs(decimal64(0), -decimal64(0)));

See Also

Meta