SafeInt.opCmp

Perform a floating-point comparison to right.

  1. auto opCmp(const M right)
    struct SafeInt(N, IntFlagPolicy _policy, Flag!"bitOps" bitOps = Yes.bitOps)
    opCmp
    const pure @safe nothrow @nogc
    (
    M
    )
    (
    const M right
    )
    if (
    isFloatingPoint!M
    )
    if (
    isIntegral!N &&
    isUnqual!N
    )
  2. int opCmp(const M right)

Return Value

Type: auto
  • -1 if this value is less than right.
  • 0 if this value is equal to right.
  • 1 if this value is greater than right.
  • float.nan if right is a floating-point nan value.

Meta