We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 699514c commit 377a131Copy full SHA for 377a131
1 file changed
src/main/java/de/tilman_neumann/jml/base/Int128.java
@@ -49,8 +49,20 @@ public long getLow() {
49
return low;
50
}
51
52
+ /**
53
+ * Signed comparison with b.
54
+ * @param b
55
+ */
56
@Override
57
public int compareTo(Int128 b) {
58
+ return high != b.high ? Long.compare(high, b.high) : Long.compareUnsigned(low, b.low);
59
+ }
60
+
61
62
+ * Unsigned comparison with b.
63
64
65
+ public int compareUnsigned(Int128 b) {
66
return high != b.high ? Long.compareUnsigned(high, b.high) : Long.compareUnsigned(low, b.low);
67
68
0 commit comments