Back to JS main page

BY:Mona M. Everett...Homepage
DATE:1997-03-07


COMMENTS:
The javascript Math object has a round function, but that function can only round to an integer. This page describes a function which will round a number to whatever precision you choose and pad the fractional part out with zeros. You can pad the integer part with a character of your choice.


Fractionalwidth Integer width Pad character


If you want this script just choose "Save Frame As..." (in Netscape) when you have the focus on the frame.

URL: http://www.oocities.org/SiliconValley/7116/jv_round.html