|
Hi,
I was looking for a method to round a number.
Is this the best way to get a rounded number to 2 decimal places?
number := 12.345.
res := ReadWriteStream with: (String new: 0).
number printOn: res decimalPlaces: 2.
number := res contents asNumber.
Thanks
Costas
|