in reply to A simple rounding question, but can't get it!
A general way to round to some place can be done by the following:
where $round is the digit that you want to round to, 0 being the 1's place, 1 the tens, and -1 the tenths place. (and so forth). You'll want to do something with $round = -2 in your case here.my $rounded = int ( $value / ( 10**$round ) + 0.5 ) * ( 10**$round );
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important
|
|---|