note 123367 added to function.round
| From: | Anonymous@php.net | Date: | Sun, 25 Nov 2018 16:42:13 +0000 |
| Subject: | note 123367 added to function.round | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209769@lists.php.net to get a copy of this message | ||
PHP_ROUND_UP does not exist, but can be done by adding half of the decimal point value:
$CeiledValue = round(($ValueToRoundUp)+0.5*10 ** -$Decimal,$Decimal);
This basically does what ceil does for integers, but with decimal points.
----
Server IP: 208.43.231.9
Probable Submitter: 85.148.222.39
----
Manual Page -- http://php.net/manual/en/function.round.php
Edit -- https://master.php.net/note/edit/123367
Del: integrated -- https://master.php.net/note/delete/123367/integrated
Del: useless -- https://master.php.net/note/delete/123367/useless
Del: bad code -- https://master.php.net/note/delete/123367/bad+code
Del: spam -- https://master.php.net/note/delete/123367/spam
Del: non-english -- https://master.php.net/note/delete/123367/non-english
Del: in docs -- https://master.php.net/note/delete/123367/in+docs
Del: other reasons-- https://master.php.net/note/delete/123367
Reject -- https://master.php.net/note/reject/123367
Search -- https://master.php.net/manage/user-notes.php