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

Yaron Golan yarongo at mercury.co.il
Thu May 6 05:18:14 PDT 2004


Nice one. 

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On Behalf
Of Jason Elbaum
Sent: Thursday, May 06, 2004 3:11 PM
To: Perl in Israel
Subject: Re: [Israel.pm] Rounding numbers to the nearest quarter???

Multiply by four, round to nearest integer, divide by four:

x=2.70
x*4 = 10.80
round(x*4) = 11
round(x*4)/4 = 2.75


Jason Elbaum
Freescale Semiconductor
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://www.perl.org.il/mailman/listinfo/perl

________________________________________________________________________
This email has been scanned for all viruses. 

Mercury Interactive Corporation
Optimizing Business Processes to Maximize Business Results

________________________________________________________________________
This email has been scanned for all viruses. 

Mercury Interactive Corporation
Optimizing Business Processes to Maximize Business Results



More information about the Perl mailing list