#36871 [Opn->WFx]: minmax(...) == min($max, max($min, $val))
| From: | tony2001@php.net | Date: | Mon, 03 Apr 2006 10:53:24 +0000 |
| Subject: | #36871 [Opn->WFx]: minmax(...) == min($max, max($min, $val)) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95259@lists.php.net to get a copy of this message | ||
ID: 36871
Updated by: tony2001@php.net
Reported By: zabmilenko at charter dot net
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: Any
PHP Version: 5.1.2
New Comment:
I don't see how such function can be useful, if you can do the same
thing with on line of code.
Previous Comments:
------------------------------------------------------------------------
[2006-03-27 12:31:45] zabmilenko at charter dot net
Description:
------------
I find myself reusing the following code to adjust numbers into a
desired range and precision:
$val = min($max, max($min, round($val, $prec));
This could be more elegantly written like:
$val = minmax($val, $min, $max[, $prec]);
In my opinion.
Thank you.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36871&edit=1