Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: rounding to nearestby dakkar (Hermit) |
on Mar 22, 2003 at 09:18 UTC ( [id://245113]=note: print w/replies, xml ) | Need Help?? |
This is parametric on the "granularity" UPDATE: and it also works if $nearest is less than 1 (say you want to round to the nearest 0.5) -- dakkar - Mobilis in mobile
In Section
Seekers of Perl Wisdom
|
|