Meaning of Float>>closeTo:

nicolas cellier ncellier at ifrance.com
Sat Mar 3 23:55:47 UTC 2007


Zulq Alam a écrit :
> Hi All,
> 
> Maybe #closeTo: has a financial background as 0.01% is 1 basis point. A 
> basis point is used to denote the change in a financial instrument 
> (http://en.wikipedia.org/wiki/Basis_points).
> 
> - Zulq.
> 
> 
> Jon Hylands wrote:
> 
>> You've found the exact threshold where it rolls over from being < 
>> 0.01% to
>>> 0.01%.
>>
>> Whether it *should* work this way is another question, but it certainly
>> seems consistent...
> 
> 
> 

Hi,

I would have conjectured it was used in Screen coordinates transform.
Since Screen have not more than a few thousands pixels...

But browsing senders, they are not so many in base image
- MethodFinder
- Float>>reduce
- Player>>setHeading:

The first, i didn't understand the power yet. Anyway MethodFinder 
implementation is not in the lightweight category, so my instinct tells 
me to keep away...

The last is highly arguable, since the message is very general. 
Fortunately there is hardly no user of reduce in Squeak (Argh i used 
reduce in Smallapack getting a 1e-4 accuracy when i try to reach 1e-15, 
but since i have other problems i don't care yet)

Player setHeading: is OK. As long as we do not throw players in 
intergalactic missions, such an accuracy is well enough.
Except if headings were accidentally provided as Fraction, which would 
mean no approximation, but i guess they aren't.


Nicolas




More information about the Squeak-dev mailing list