cvs: pear /Math_Basex Basex.php
| From: | Dave Mertens | Date: | Thu, 12 Dec 2002 18:50:45 +0000 |
| Subject: | cvs: pear /Math_Basex Basex.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7854@lists.php.net to get a copy of this message | ||
zyprexia Thu Dec 12 13:50:45 2002 EDT
Modified files:
/pear/Math_Basex Basex.php
Log:
round makes from a string a valid number (1). This influence our input checking.
Problem solved, next please ;-)
Index: pear/Math_Basex/Basex.php
diff -u pear/Math_Basex/Basex.php:1.3 pear/Math_Basex/Basex.php:1.4
--- pear/Math_Basex/Basex.php:1.3 Wed Dec 11 17:05:32 2002
+++ pear/Math_Basex/Basex.php Thu Dec 12 13:50:45 2002
@@ -16,7 +16,7 @@
// | Authors: Dave Mertens <dmertens@zyprexia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Basex.php,v 1.3 2002/12/11 22:05:32 zyprexia Exp $
+// $Id: Basex.php,v 1.4 2002/12/12 18:50:45 zyprexia Exp $
require_once "PEAR.php";
@@ -97,13 +97,13 @@
*/
function toBase($number)
{
- $number = round($number, 0); //this won't work on floating numbers...
if (!is_numeric($number))
return $this->raiseError("You must supply a decimal number");
if ($this->_length == 0)
return $this->raiseError("Character base isn't defined yet..");
-
+
+ $number = round($number, 0); //this won't work on floating numbers...
$code = "";
do
{