7 ms·
Things where equality is on more than one axis, _but there is a primary one where people use._ Think things like vectors or complex numbers, or people. The ab
by myrryr 2y ago
Things where equality is on more than one axis, _but there is a primary one where people use._
Think things like vectors or complex numbers, or people.
The absolutely classic example however is types which have a signed zero...
- auggierose 2y agoThat is not a problem, just pick the same equality that your .compareTo method uses. You could pick -0 < 0, and -0 ≠ 0, or -0 = 0. You should never pick -0 < 0 (via compareTo), but -0 = 0 (via equals).