in reply to Rounding Variables
Or, if you want it to to look a bit cleaner (i.e. have a leading '0' - 0.21 instead of .21) then you can use the following:$roundeddistance = sprintf "%0.2f", $distance;
$roundeddistance = sprintf "%1.2f", $distance;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Rounding Variables
by Albannach (Monsignor) on Oct 10, 2000 at 07:49 UTC |