Math_UnitConvert
| From: | Markus Tacker | Date: | Mon, 17 Apr 2006 11:59:34 +0000 |
| Subject: | Math_UnitConvert | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-42263@lists.php.net to get a copy of this message | ||
The proposal [1] seems like a good idea but I'd like to see a more
strict API which is
less prone for user errors.
So instead of
$converter->convert("15 miles", "kilometers")
you should use constants for the units
$converter->convert(15, MATH_UNITCONVERT_MILES, MATH_UNITCONVERT_KILOMETERS);
[1] http://pear.php.net/pepr/pepr-proposal-show.php?id=391
--
mit freundlichen Grüßen email ~ m@tacker.org
Markus Tacker url ~ http://m.tacker.org/
icq ~ 91709561