2 // Magnitudes are objects which represent a linear measure
4 == { arg aMagnitude; ^this.subclassResponsibility(thisMethod) }
5 != { arg aMagnitude; ^(this == aMagnitude).not }
6 hash { ^this.subclassResponsibility(thisMethod) }
8 // all of the other compare operations are built upon <
9 < { arg aMagnitude; ^this.subclassResponsibility(thisMethod) }
11 > { arg aMagnitude; ^aMagnitude < this }
12 <= { arg aMagnitude; ^(aMagnitude < this).not }
13 >= { arg aMagnitude; ^(this < aMagnitude).not }
14 exclusivelyBetween { arg lo, hi; ^(lo < this) and: { this < hi } }
15 inclusivelyBetween { arg lo, hi; ^(lo <= this) and: { this <= hi } }
16 min { arg aMagnitude; if (this < aMagnitude, {^this}, {^aMagnitude}) }
17 max { arg aMagnitude; if (this < aMagnitude, {^aMagnitude}, {^this}) }
19 // clip the receiver to the range lo, hi
20 ^if (this < lo, {^lo}, { if (hi < this, {^hi}, {^this}) })