BigInt.cmp

Compare this to another BigInt

  1. int cmp(const(BigInt)* other, bool check_signs)
    struct BigInt
    const
    int
    cmp
    (
    const(BigInt)* other
    ,
    bool check_signs = true
    )
  2. int cmp(BigInt other, bool check_signs)

Parameters

other const(BigInt)*

the BigInt value to compare with

check_signs bool

include sign in comparison?

Return Value

Type: int

if (this<n) return -1, if (this>n) return 1, if both values are identical return 0 [like Perl's <=> operator]

Meta