[Newbies] Rouding Floats up to a number of decimals - Method
Finder
Herbert König
herbertkoenig at gmx.net
Wed Jul 23 14:30:19 UTC 2008
Hello Cédrick,
c> So anybody has an idea of methods that truncate/round Floats ?
sorry for ignoring your main question.
Float has a truncate and round off protocal with metods that truncate
and round to integer.
So it looks you have to do something like
(aFloat * (10^desiredDecimals) + 0.5) truncated / (10^desiredDecimals)
or without the + 0.5 for truncation.
Cheers,
Herbert
More information about the Beginners
mailing list