compareTo

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

Order by exact cross-multiplication: a/b <=> c/d compares a*d against c*b. Both products are overflow-checked, so an out-of-range comparison throws ArithmeticException rather than wrapping to a wrong verdict.