[squeak-dev] Rounding to n significant digits?
bert at freudenbergs.de
Thu Aug 4 09:20:41 UTC 2011
I'd like to print decimal Floats with at most n significant digits. E.g.
123456 roundToSignificantDigits: 3
0.00123456 roundToSignificantDigits: 3
Would this generally be useful? If so, what would a good selector be? And what a good implementation? Instead of rounding I'd be happy to just get a String.
- Bert -
More information about the Squeak-dev