Intervals
Michael Donegan
invader at zilker.net
Tue Nov 30 17:27:00 UTC 1999
Here is a somewhat simpler version of valuesInclude: which is based on the
actual construction of the interval.
valuesInclude: aNumber
"Private - answer whether or not aNumber is one of the enumerated
values in this interval."
| val |
val _ aNumber - self first / self increment.
^ ( val - val rounded ) abs < 1e-10
More information about the Squeak-dev
mailing list
|