Edit report at http://bugs.php.net/bug.php?id=25689&edit=1

 ID:                 25689
 Updated by:         [email protected]
 Reported by:        php at pgregg dot com
 Summary:            RFE for: ceil() floor() functions
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Math related
 Operating System:   *
 PHP Version:        *
-Assigned To:        
+Assigned To:        jani
 Block user comment: N
 Private report:     N

 New Comment:

Same as bug #23498


Previous Comments:
------------------------------------------------------------------------
[2005-07-06 23:06:09] tuxedobob at mac dot com

Agreed, but...



It would be nice if ceil() and floor() had a precision 

parameter similar to that of round(), such that:



floor(3.14159, 2) = 3.14

ceil(3.14159, 2)  = 3.15

------------------------------------------------------------------------
[2003-09-29 09:27:25] php at pgregg dot com

Description:
------------
RFE: modify ceil/floor functions so that they take a second optional
argument (default 1) that is the factor to which the number is rounded
up or down?  e.g. you want to round up to the nearest 50?  $x = ceil($y,
50);

currently you'd have to do: $x = intval(($y+49)/50)*50;



This would retain backward compatibility with all code as the default
value of 1 would mean that behaviour was the same.



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=25689&edit=1

Reply via email to