note 95037 deleted from function.round by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 Dec 2009 03:17:26 +0000 |
| Subject: | note 95037 deleted from function.round by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163804@lists.php.net to get a copy of this message | ||
Note Submitter: stuckinphp
----
The round_up function noted doesn't work, neither does his fix, this should do the trick,
handles negative values as well.
function round_up($value,$precision){
return round($value + (0.5*pow(10,-$precision)),$precision);
}