17 return (abs($denominator) < 1.0E-12) ?
Functions::DIV0() : ($numerator / $denominator);
30 if ($number === null) {
33 if (is_bool($number)) {
36 if (is_numeric($number)) {
54 if ($number === null && $substitute !== null) {
57 if (is_numeric($number)) {
108 return $number ? (($number > 0) ? 1 : -1) : 0;
111 public static function getEven(
float $number): float
113 $significance = 2 * self::returnSign($number);
115 return $significance ? (ceil($number / $significance) * $significance) : 0;
static validateNumericNullBool($number)
Many functions accept null/false/true argument treated as 0/0/1.
static getEven(float $number)
static numberOrNan($result)
Return NAN or value depending on argument.
static validateNotZero($number)
Confirm number != 0.
static validateNumericNullSubstitution($number, $substitute)
Validate numeric, but allow substitute for null.
static verySmallDenominator(float $numerator, float $denominator)
Many functions accept null/false/true argument treated as 0/0/1.
static returnSign(float $number)
static validateNotNegative($number, ?string $except=null)
Confirm number >= 0.
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
static validatePositive($number, ?string $except=null)
Confirm number > 0.