View Full Version : Math.round()
VoS
March 27th, 2005, 05:51 PM
quick question ;)
how do you round a number to 4 digits...
so 3.45356345345
is 3.456
and 1
is 1.000
//VoS
nathan99
March 27th, 2005, 05:55 PM
So do mean round or just limit the amount of digits?
nathan99
March 27th, 2005, 05:58 PM
I just looked in the help and it said that the following code
Math.ceil(12.5);
returns a value of 13
and
Math.floor(12.5);
returns a value of 12
i dont know if it helps....
VoS
March 27th, 2005, 06:01 PM
well limit digits is good enough , but what i really want is a round but that always keeps like 3 decimals ( making a pretty precise timer , but dont need it the 10 digit precise the pc puts out)
stwingy
March 27th, 2005, 06:11 PM
well limit digits is good enough , but what i really want is a round but that always keeps like 3 decimals ( making a pretty precise timer , but dont need it the 10 digit precise the pc puts out)
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_15542
VoS
March 27th, 2005, 06:13 PM
ty =)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.