Axis::nice PHP Method

nice() private method

Returns TRUE if the number $n is 'nice'
private nice ( $n, $m )
    private function nice($n, $m)
    {
        if (is_integer($n) && ($n % 100 == 0 || $n % 10 == 0 || $n % 5 == 0)) {
            return true;
        }
        if ($this->min_unit) {
            $d = $n / $this->min_unit;
            if ($d != floor($d)) {
                return false;
            }
        }
        $s = (string) $n;
        if (preg_match('/^\\d(\\.\\d{1,1})$/', $s)) {
            return true;
        }
        if (preg_match('/^\\d+$/', $s)) {
            return true;
        }
        return false;
    }