compareTo

open operator override fun compareTo(other: Weight): Int

Order by exact cross-multiplication: a/b <=> c/d compares a·d against c·b, with both products formed in 128 bits. Any two Longs multiply exactly there, so every pair of weights orders and none throws (#3313).