[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-users
Subject: RE: Round number
From: "Ron Hartikka" <ronh () iainc ! com>
Date: 2001-05-31 16:19:24
[Download RAW message or body]
I say floor! floor! which, along with ceil! ceil! comes with Perl.
use POSIX;
$ceil = ceil(3.5); # 4
$floor = floor(3.5); # 3
See perlfaq4: "Does Perl have a round function?"
-----Original Message-----
From: perl-win32-users-admin@listserv.ActiveState.com
[mailto:perl-win32-users-admin@listserv.ActiveState.com]On Behalf Of
Morbus Iff
Sent: Thursday, May 31, 2001 10:05 AM
To: Antonio Jose da Cunha e Vasconcelos;
perl-win32-users@listserv.ActiveState.com;
perl-win32-web@listserv.ActiveState.com;
perl-win32-database@listserv.ActiveState.com
Subject: Re: Round number
>I'm getting some information from my database and after some mathematical
>operations i get a decimal number and i would like to round it...how can i
>do that?
A lot of people will say "int! int!", but you can find a more "powerful"
routine called "round" at the URL below. It allows you to choose what place
you'd like to round a number to.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/sbeating/sb/sb-lib.pl?rev=1.1
1&content-type=text/vnd.viewcvs-markup
Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic