Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: rounding to nearest

by mojotoad (Monsignor)
on Mar 22, 2003 at 15:40 UTC ( [id://245154]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      use Math::Round qw(nearest);
    
      $quote = 418.00;
      $price = nearest(10, $quote);
    
  2. or download this
    sub nearest {
     my ($targ, @inputs) = @_;
    ...
     }
     return (wantarray) ? @res : $res[0];
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://245154]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found