Proposed function for the Format module: enforceDecimalPlaces(number, places)
I have already integrated my function into revision 295; see the attached patch. This function will deprecate twoDigitFloat (hopefully) because it is more flexible and more true to printf formatting behavior. I also added unit tests, please read the comments for them in the patch.
Please let me know if it needs to be cleaned up or changed in any way, I will get you another patch. If you use this code I would like to keep my copyright but I have no problem with donating this code under this project's license.
-Matthew Elder <sseses@gmail.com>
Attachments
- enforcedecimalplaces_revision295.patch (5.2 kB) -
patch to add enforceDecimalPlaces function against r295
, added by mae<sseses@gmail.com> on 10/08/05 20:55:49.
