/** * 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); }
/** * @param number $number * * @return int */ private static function precision_from($number) { return Number::precision_from($number); }
/** * @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'); }