[Newbies] How to round a float?
Louis LaBrunda
Lou at Keystone-Software.com
Mon Feb 16 15:29:47 UTC 2015
Hi Nicolas,
>Lou, I'm very suspicious about what VA does.
>IMO you should not trust too much what you see (what it prints!)
I think I agree with everything you say. I assumed (I know that might get
me in trouble) that Chuck was rounding to print or display the value.
Personally I don't see any reason to round floats (or almost anything else)
except to display them in a simpler form. Given that, 162.89 looks better
than 162.89000000000001 and is probably what Chuck was looking for.
That's why I thought there was a problem with #roundTo: but maybe #roundTo:
has some other intent that I'm not aware of?
Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com
More information about the Beginners
mailing list