Exemplo n.º 1
0
 /**
  * Parses a number.
  *
  * @param number $number
  * @param null|int $precision
  *
  * @return array
  *
  * @deprecated
  *
  * @see Number::parse()
  */
 public static function parse_number($number, $precision = null)
 {
     return Number::parse($number, $precision);
 }
Exemplo n.º 2
0
 /**
  * @param number $number
  *
  * @return int
  */
 private static function precision_from($number)
 {
     return Number::precision_from($number);
 }
Exemplo n.º 3
0
 /**
  * @param number $number
  */
 private function __construct($number)
 {
     list($integer, $precision) = Number::parse($number);
     $this->n = abs($number);
     $this->i = $integer;
     $this->v = strlen($precision);
     $this->w = strlen(rtrim($precision, '0'));
     $this->f = (int) ltrim($precision, '0');
     $this->t = (int) trim($precision, '0');
 }