-
rounding variables
How do round off a variable to the closest 100?
-
in what? php? flash?
its pretty easy tho..
if you have a large number (2137472 for example) and u want it rounded to the nearest 100, then divide the original number 2137472 by 100, which gives 21374.72... use a round function to get rid of the .72, then multiply it by 100 again..
Code:
count = 2137472;
var = Math.Round(count/100)*100;
you should be more depth with your questions to be honest...
-
Me so stupid.
Tanks, and yes there was no depth in in my question, sorry
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|