rounding floats up to specified number of decimal digits

ref2401 refactor24 at gmail.com
Sun Dec 15 06:35:03 PST 2013


I'm seeking for a way to round floats up to specified number of 
decimal digits. e.g. roundToDigits(3.1415, 2) should return 3.14.
Is there a standard function for that or what is the most correct 
way to do that?


More information about the Digitalmars-d-learn mailing list