Meaning of Float>>closeTo:

Blake blake at kingdomrpg.com
Fri Mar 2 23:05:59 UTC 2007


On Fri, 02 Mar 2007 07:58:02 -0800, Bert Freudenberg  
<bert at freudenbergs.de> wrote:

> It's a very sensible definition of "close to":
>
> {
> 1.1 closeTo: 1.0.
> 10.1 closeTo: 10.0.
> 100.1 closeTo: 100.0.
> 1000.1 closeTo: 1000.0.
> }

If it be an issue then why not extend:

1.1 closeTo: 1.0 within: 0.01  "...so 1%, which would be false here..."
10.1 closeTo: 10.0 within: 0.01 "...true, assuming <=..."

?



More information about the Squeak-dev mailing list