Intervals
Andrew P. Black
apb at cse.ogi.edu
Tue Nov 30 02:50:14 UTC 1999
>Shouldn't that test on step compare it with ZERO? It fails miserably
>when the step is 0.5.
>
>includes: aNumber
> | offset |
> step = 1 ifTrue: [^ aNumber between: self first and: self last].
> step > 0
> ifTrue: [offset _ aNumber - start.
> ^ (aNumber between: start and: self ...
Yes, David is right. (embarassed smile) And I subjected this to extensive
random testing, too -- but only for integer step sizes :-(
Andrew
More information about the Squeak-dev
mailing list
|