AngouriMath
CompareTo(AngouriMath.Entity.Number.Real)
Method (no overloads)
Summary
Negative, zero or positive as this is less than, equal to or greater than
other , which is what sorting wants.
Remarks
This orders NaN and the operators do not, which is
deliberate rather than an inconsistency left behind. Sorting requires a total
order -- Sort(System.Array) may loop or throw
without one -- so NaN has to sort somewhere, and it sorts above
every number. "Where does this sort" and "is this greater" are different
questions, and only the second has no answer for a value that is not a number.
See https://github.com/asc-community/AngouriMath/issues/947.
deliberate rather than an inconsistency left behind. Sorting requires a total
order -- Sort(System.Array) may loop or throw
without one -- so NaN has to sort somewhere, and it sorts above
every number. "Where does this sort" and "is this greater" are different
questions, and only the second has no answer for a value that is not a number.
See https://github.com/asc-community/AngouriMath/issues/947.
Exception "ArgumentNullException"
Thrown where other is null . Unlike
IComparable`1's usual contract, null does not sort first
here; it is refused.
IComparable`1's usual contract, null does not sort first
here; it is refused.
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online