[Newbies] Re: Rouding Floats up to a number of decimals - Method
Finder
nicolas cellier
ncellier at ifrance.com
Wed Jul 23 18:31:23 UTC 2008
cdrick a écrit :
>> 1.2288 roundTo: 1 "1"
>> 1.2288 roundTo: 0.1 "1.2"
>> 1.2288 roundTo: 0.01 "1.23"
>> 1.2288 roundTo: 0.001 "1.229"
>> 1.2288 roundTo: 0.0001 "1.2288"
>> 1.2288 roundTo: 0.05 "1.25"
>> 1.2288 roundTo: 0.002 "1.228"
>
> Stupid me again ;)
>
> I only tried #roundTo: with Integer.
>
> But #printShowingDecimalPlaces: is alright ;)
>
> Thanks...
>
> Cédrick
>
You might want to check for http://bugs.squeak.org/view.php?id=5640
Installer mantis ensureFix: 5640.
More information about the Beginners
mailing list