E.g. 0.0234 => 0.025 0.0482 => 0.05 0.0513 => 0.05Here is a pretty snippet to make it
sub round_005 { return (sprintf '%0.2f', $_[0] * 2) / 2; } print "$_ => " . round_005($_) . "\n" for .234, .0482, .0513;
In reply to rounding money value to a half of a cent by ccn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |