[Israel.pm] Rounding numbers to the nearest quarter???

Yuval Yaari yuval at windax.com
Thu May 6 05:07:02 PDT 2004


Hi,

I need to round numbers to their nearest quarter, e.g:
5.20 => 5.25
10.00 => 10.00 (no need to round)
10.40 => 10.50
3.70 => 3.75
3.80 => 3.75

All solutions (hacks and "kosher") are welcome...


  --Yuval




More information about the Perl mailing list