MathTrig - Change Names of funcWhatever to evaluate (#2008)

* MathTrig - Change Names of funcWhatever to evaluate

Per discussions while MathTrig was being broken up, this would help standardize the code. That idea was adopted partway through the breakup. This PR applies that standardization to the earlier efforts. A similar effort is required for DateTime; that will come later. This PR replaces #2006.

The only 2 remaining funcWhatevers in MathTrig are both in SUM, which required two different methods depending on whether or not string parameters were to be ignored. It seems appropriate to leave those method names non-standardized in order to require a decision about which is to be used if they are invoked internally.

3 Phpstan grandfathered errors were eliminated as part of this change, and its baseline has changed accordingly.

Co-authored-by: Mark Baker <mark@lange.demon.co.uk>
This commit is contained in:
oleibman 2021-04-20 13:43:29 -07:00 committed by GitHub
parent c79a9a8e21
commit b05dc31850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 249 additions and 262 deletions

View File

@ -1725,21 +1725,6 @@ parameters:
count: 2 count: 2
path: src/PhpSpreadsheet/Calculation/TextData/Extract.php path: src/PhpSpreadsheet/Calculation/TextData/Extract.php
-
message: "#^Parameter \\#1 \\$number of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\MathTrig\\\\Mround\\:\\:funcMround\\(\\) expects float, float\\|int\\|string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/TextData/Format.php
-
message: "#^Parameter \\#1 \\$number of function floor expects float, float\\|int\\|string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/TextData/Format.php
-
message: "#^Parameter \\#1 \\$number of function round expects float, float\\|int\\|string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/TextData/Format.php
- -
message: "#^Cannot cast array\\|float\\|int\\|string to float\\.$#" message: "#^Cannot cast array\\|float\\|int\\|string to float\\.$#"
count: 1 count: 1

View File

@ -243,22 +243,22 @@ class Calculation
], ],
'ACOS' => [ 'ACOS' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Acos::class, 'funcAcos'], 'functionCall' => [MathTrig\Acos::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'ACOSH' => [ 'ACOSH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Acosh::class, 'funcAcosh'], 'functionCall' => [MathTrig\Acosh::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'ACOT' => [ 'ACOT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Acot::class, 'funcAcot'], 'functionCall' => [MathTrig\Acot::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'ACOTH' => [ 'ACOTH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Acoth::class, 'funcAcoth'], 'functionCall' => [MathTrig\Acoth::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'ADDRESS' => [ 'ADDRESS' => [
@ -303,27 +303,27 @@ class Calculation
], ],
'ASIN' => [ 'ASIN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Asin::class, 'funcAsin'], 'functionCall' => [MathTrig\Asin::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'ASINH' => [ 'ASINH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Asinh::class, 'funcAsinh'], 'functionCall' => [MathTrig\Asinh::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'ATAN' => [ 'ATAN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Atan::class, 'funcAtan'], 'functionCall' => [MathTrig\Atan::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'ATAN2' => [ 'ATAN2' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Atan2::class, 'funcAtan2'], 'functionCall' => [MathTrig\Atan2::class, 'evaluate'],
'argumentCount' => '2', 'argumentCount' => '2',
], ],
'ATANH' => [ 'ATANH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Atanh::class, 'funcAtanh'], 'functionCall' => [MathTrig\Atanh::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'AVEDEV' => [ 'AVEDEV' => [
@ -358,7 +358,7 @@ class Calculation
], ],
'BASE' => [ 'BASE' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Base::class, 'funcBase'], 'functionCall' => [MathTrig\Base::class, 'evaluate'],
'argumentCount' => '2,3', 'argumentCount' => '2,3',
], ],
'BESSELI' => [ 'BESSELI' => [
@ -463,17 +463,17 @@ class Calculation
], ],
'CEILING' => [ 'CEILING' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Ceiling::class, 'funcCeiling'], 'functionCall' => [MathTrig\Ceiling::class, 'evaluate'],
'argumentCount' => '1-2', // 2 for Excel, 1-2 for Ods/Gnumeric 'argumentCount' => '1-2', // 2 for Excel, 1-2 for Ods/Gnumeric
], ],
'CEILING.MATH' => [ 'CEILING.MATH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\CeilingMath::class, 'funcCeilingMath'], 'functionCall' => [MathTrig\CeilingMath::class, 'evaluate'],
'argumentCount' => '1-3', 'argumentCount' => '1-3',
], ],
'CEILING.PRECISE' => [ 'CEILING.PRECISE' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\CeilingPrecise::class, 'funcCeilingPrecise'], 'functionCall' => [MathTrig\CeilingPrecise::class, 'evaluate'],
'argumentCount' => '1,2', 'argumentCount' => '1,2',
], ],
'CELL' => [ 'CELL' => [
@ -605,22 +605,22 @@ class Calculation
], ],
'COS' => [ 'COS' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Cos::class, 'funcCos'], 'functionCall' => [MathTrig\Cos::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'COSH' => [ 'COSH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Cosh::class, 'funcCosh'], 'functionCall' => [MathTrig\Cosh::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'COT' => [ 'COT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Cot::class, 'funcCot'], 'functionCall' => [MathTrig\Cot::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'COTH' => [ 'COTH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Coth::class, 'funcCoth'], 'functionCall' => [MathTrig\Coth::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'COUNT' => [ 'COUNT' => [
@ -700,12 +700,12 @@ class Calculation
], ],
'CSC' => [ 'CSC' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Csc::class, 'funcCsc'], 'functionCall' => [MathTrig\Csc::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'CSCH' => [ 'CSCH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Csch::class, 'funcCsch'], 'functionCall' => [MathTrig\Csch::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'CUBEKPIMEMBER' => [ 'CUBEKPIMEMBER' => [
@ -965,7 +965,7 @@ class Calculation
], ],
'EVEN' => [ 'EVEN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Even::class, 'funcEven'], 'functionCall' => [MathTrig\Even::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'EXACT' => [ 'EXACT' => [
@ -990,7 +990,7 @@ class Calculation
], ],
'FACT' => [ 'FACT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Fact::class, 'funcFact'], 'functionCall' => [MathTrig\Fact::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'FACTDOUBLE' => [ 'FACTDOUBLE' => [
@ -1070,17 +1070,17 @@ class Calculation
], ],
'FLOOR' => [ 'FLOOR' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Floor::class, 'funcFloor'], 'functionCall' => [MathTrig\Floor::class, 'evaluate'],
'argumentCount' => '1-2', // Excel requries 2, Ods/Gnumeric 1-2 'argumentCount' => '1-2', // Excel requries 2, Ods/Gnumeric 1-2
], ],
'FLOOR.MATH' => [ 'FLOOR.MATH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\FloorMath::class, 'funcFloorMath'], 'functionCall' => [MathTrig\FloorMath::class, 'evaluate'],
'argumentCount' => '1-3', 'argumentCount' => '1-3',
], ],
'FLOOR.PRECISE' => [ 'FLOOR.PRECISE' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\FloorPrecise::class, 'funcFloorPrecise'], 'functionCall' => [MathTrig\FloorPrecise::class, 'evaluate'],
'argumentCount' => '1-2', 'argumentCount' => '1-2',
], ],
'FORECAST' => [ 'FORECAST' => [
@ -1419,7 +1419,7 @@ class Calculation
], ],
'INT' => [ 'INT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\IntClass::class, 'funcInt'], 'functionCall' => [MathTrig\IntClass::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'INTERCEPT' => [ 'INTERCEPT' => [
@ -1536,7 +1536,7 @@ class Calculation
], ],
'LCM' => [ 'LCM' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Lcm::class, 'funcLcm'], 'functionCall' => [MathTrig\Lcm::class, 'evaluate'],
'argumentCount' => '1+', 'argumentCount' => '1+',
], ],
'LEFT' => [ 'LEFT' => [
@ -1726,17 +1726,17 @@ class Calculation
], ],
'MROUND' => [ 'MROUND' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Mround::class, 'funcMround'], 'functionCall' => [MathTrig\Mround::class, 'evaluate'],
'argumentCount' => '2', 'argumentCount' => '2',
], ],
'MULTINOMIAL' => [ 'MULTINOMIAL' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Multinomial::class, 'funcMultinomial'], 'functionCall' => [MathTrig\Multinomial::class, 'evaluate'],
'argumentCount' => '1+', 'argumentCount' => '1+',
], ],
'MUNIT' => [ 'MUNIT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\MatrixFunctions::class, 'funcMUnit'], 'functionCall' => [MathTrig\MatrixFunctions::class, 'identity'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'N' => [ 'N' => [
@ -1856,7 +1856,7 @@ class Calculation
], ],
'ODD' => [ 'ODD' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Odd::class, 'funcOdd'], 'functionCall' => [MathTrig\Odd::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'ODDFPRICE' => [ 'ODDFPRICE' => [
@ -2003,7 +2003,7 @@ class Calculation
], ],
'PRODUCT' => [ 'PRODUCT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Product::class, 'funcProduct'], 'functionCall' => [MathTrig\Product::class, 'evaluate'],
'argumentCount' => '1+', 'argumentCount' => '1+',
], ],
'PROPER' => [ 'PROPER' => [
@ -2033,7 +2033,7 @@ class Calculation
], ],
'QUOTIENT' => [ 'QUOTIENT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Quotient::class, 'funcQuotient'], 'functionCall' => [MathTrig\Quotient::class, 'evaluate'],
'argumentCount' => '2', 'argumentCount' => '2',
], ],
'RADIANS' => [ 'RADIANS' => [
@ -2108,22 +2108,22 @@ class Calculation
], ],
'ROMAN' => [ 'ROMAN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Roman::class, 'funcRoman'], 'functionCall' => [MathTrig\Roman::class, 'evaluate'],
'argumentCount' => '1,2', 'argumentCount' => '1,2',
], ],
'ROUND' => [ 'ROUND' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Round::class, 'builtinROUND'], 'functionCall' => [MathTrig\Round::class, 'evaluate'],
'argumentCount' => '2', 'argumentCount' => '2',
], ],
'ROUNDDOWN' => [ 'ROUNDDOWN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\RoundDown::class, 'funcRoundDown'], 'functionCall' => [MathTrig\RoundDown::class, 'evaluate'],
'argumentCount' => '2', 'argumentCount' => '2',
], ],
'ROUNDUP' => [ 'ROUNDUP' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\RoundUp::class, 'funcRoundUp'], 'functionCall' => [MathTrig\RoundUp::class, 'evaluate'],
'argumentCount' => '2', 'argumentCount' => '2',
], ],
'ROW' => [ 'ROW' => [
@ -2165,12 +2165,12 @@ class Calculation
], ],
'SEC' => [ 'SEC' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Sec::class, 'funcSec'], 'functionCall' => [MathTrig\Sec::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'SECH' => [ 'SECH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Sech::class, 'funcSech'], 'functionCall' => [MathTrig\Sech::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'SECOND' => [ 'SECOND' => [
@ -2185,7 +2185,7 @@ class Calculation
], ],
'SERIESSUM' => [ 'SERIESSUM' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\SeriesSum::class, 'funcSeriesSum'], 'functionCall' => [MathTrig\SeriesSum::class, 'evaluate'],
'argumentCount' => '4', 'argumentCount' => '4',
], ],
'SHEET' => [ 'SHEET' => [
@ -2200,17 +2200,17 @@ class Calculation
], ],
'SIGN' => [ 'SIGN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Sign::class, 'funcSign'], 'functionCall' => [MathTrig\Sign::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'SIN' => [ 'SIN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Sin::class, 'funcSin'], 'functionCall' => [MathTrig\Sin::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'SINH' => [ 'SINH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Sinh::class, 'funcSinh'], 'functionCall' => [MathTrig\Sinh::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'SKEW' => [ 'SKEW' => [
@ -2305,7 +2305,7 @@ class Calculation
], ],
'SUBTOTAL' => [ 'SUBTOTAL' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Subtotal::class, 'funcSubtotal'], 'functionCall' => [MathTrig\Subtotal::class, 'evaluate'],
'argumentCount' => '2+', 'argumentCount' => '2+',
'passCellReference' => true, 'passCellReference' => true,
], ],
@ -2326,7 +2326,7 @@ class Calculation
], ],
'SUMPRODUCT' => [ 'SUMPRODUCT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\SumProduct::class, 'funcSumProduct'], 'functionCall' => [MathTrig\SumProduct::class, 'evaluate'],
'argumentCount' => '1+', 'argumentCount' => '1+',
], ],
'SUMSQ' => [ 'SUMSQ' => [
@ -2366,12 +2366,12 @@ class Calculation
], ],
'TAN' => [ 'TAN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Tan::class, 'funcTan'], 'functionCall' => [MathTrig\Tan::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'TANH' => [ 'TANH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Tanh::class, 'funcTanh'], 'functionCall' => [MathTrig\Tanh::class, 'evaluate'],
'argumentCount' => '1', 'argumentCount' => '1',
], ],
'TBILLEQ' => [ 'TBILLEQ' => [
@ -2476,7 +2476,7 @@ class Calculation
], ],
'TRUNC' => [ 'TRUNC' => [
'category' => Category::CATEGORY_MATH_AND_TRIG, 'category' => Category::CATEGORY_MATH_AND_TRIG,
'functionCall' => [MathTrig\Trunc::class, 'funcTrunc'], 'functionCall' => [MathTrig\Trunc::class, 'evaluate'],
'argumentCount' => '1,2', 'argumentCount' => '1,2',
], ],
'TTEST' => [ 'TTEST' => [

View File

@ -38,7 +38,7 @@ class DProduct extends DatabaseAbstract
return null; return null;
} }
return MathTrig\Product::funcProduct( return MathTrig\Product::evaluate(
self::getFilteredColumn($database, $field, $criteria) self::getFilteredColumn($database, $field, $criteria)
); );
} }

View File

@ -44,8 +44,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Atan2::funcAtan2() * @See MathTrig\Atan2::evaluate()
* Use the funcAtan2 method in the MathTrig\Atan2 class instead * Use the evaluate method in the MathTrig\Atan2 class instead
* *
* @param float $xCoordinate the x-coordinate of the point * @param float $xCoordinate the x-coordinate of the point
* @param float $yCoordinate the y-coordinate of the point * @param float $yCoordinate the y-coordinate of the point
@ -54,7 +54,7 @@ class MathTrig
*/ */
public static function ATAN2($xCoordinate = null, $yCoordinate = null) public static function ATAN2($xCoordinate = null, $yCoordinate = null)
{ {
return MathTrig\Atan2::funcAtan2($xCoordinate, $yCoordinate); return MathTrig\Atan2::evaluate($xCoordinate, $yCoordinate);
} }
/** /**
@ -67,8 +67,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Base::funcBase() * @See MathTrig\Base::evaluate()
* Use the funcBase method in the MathTrig\Base class instead * Use the evaluate method in the MathTrig\Base class instead
* *
* @param float $number * @param float $number
* @param float $radix * @param float $radix
@ -78,7 +78,7 @@ class MathTrig
*/ */
public static function BASE($number, $radix, $minLength = null) public static function BASE($number, $radix, $minLength = null)
{ {
return MathTrig\Base::funcBase($number, $radix, $minLength); return MathTrig\Base::evaluate($number, $radix, $minLength);
} }
/** /**
@ -94,8 +94,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see MathTrig\Ceiling::funcCeiling() * @see MathTrig\Ceiling::evaluate()
* Use the funcCeiling() method in the MathTrig\Ceiling class instead * Use the evaluate() method in the MathTrig\Ceiling class instead
* *
* @param float $number the number you want to round * @param float $number the number you want to round
* @param float $significance the multiple to which you want to round * @param float $significance the multiple to which you want to round
@ -104,7 +104,7 @@ class MathTrig
*/ */
public static function CEILING($number, $significance = null) public static function CEILING($number, $significance = null)
{ {
return MathTrig\Ceiling::funcCeiling($number, $significance); return MathTrig\Ceiling::evaluate($number, $significance);
} }
/** /**
@ -145,8 +145,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @see MathTrig\Even::funcEven() * @see MathTrig\Even::evaluate()
* Use the funcEven() method in the MathTrig\Even class instead * Use the evaluate() method in the MathTrig\Even class instead
* *
* @param float $number Number to round * @param float $number Number to round
* *
@ -154,7 +154,7 @@ class MathTrig
*/ */
public static function EVEN($number) public static function EVEN($number)
{ {
return MathTrig\Even::funcEven($number); return MathTrig\Even::evaluate($number);
} }
/** /**
@ -163,7 +163,7 @@ class MathTrig
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @see MathTrig\Helpers::getEven() * @see MathTrig\Helpers::getEven()
* Use the funcEven() method in the MathTrig\Helpers class instead * Use the evaluate() method in the MathTrig\Helpers class instead
*/ */
public static function getEven(float $number): int public static function getEven(float $number): int
{ {
@ -181,8 +181,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @see MathTrig\Fact::funcFact() * @see MathTrig\Fact::evaluate()
* Use the funcFact() method in the MathTrig\Fact class instead * Use the evaluate() method in the MathTrig\Fact class instead
* *
* @param float $factVal Factorial Value * @param float $factVal Factorial Value
* *
@ -190,7 +190,7 @@ class MathTrig
*/ */
public static function FACT($factVal) public static function FACT($factVal)
{ {
return MathTrig\Fact::funcFact($factVal); return MathTrig\Fact::evaluate($factVal);
} }
/** /**
@ -225,8 +225,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see MathTrig\Floor::funcFloor() * @see MathTrig\Floor::evaluate()
* Use the funcFloor() method in the MathTrig\Floor class instead * Use the evaluate() method in the MathTrig\Floor class instead
* *
* @param float $number Number to round * @param float $number Number to round
* @param float $significance Significance * @param float $significance Significance
@ -235,7 +235,7 @@ class MathTrig
*/ */
public static function FLOOR($number, $significance = null) public static function FLOOR($number, $significance = null)
{ {
return MathTrig\Floor::funcFloor($number, $significance); return MathTrig\Floor::evaluate($number, $significance);
} }
/** /**
@ -248,8 +248,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see MathTrig\FloorMath::funcFloorMath() * @see MathTrig\FloorMath::evaluate()
* Use the funcFloorMath() method in the MathTrig\FloorMath class instead * Use the evaluate() method in the MathTrig\FloorMath class instead
* *
* @param float $number Number to round * @param float $number Number to round
* @param float $significance Significance * @param float $significance Significance
@ -259,7 +259,7 @@ class MathTrig
*/ */
public static function FLOORMATH($number, $significance = null, $mode = 0) public static function FLOORMATH($number, $significance = null, $mode = 0)
{ {
return MathTrig\FloorMath::funcFloorMath($number, $significance, $mode); return MathTrig\FloorMath::evaluate($number, $significance, $mode);
} }
/** /**
@ -272,8 +272,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see MathTrig\FloorPrecise::funcFloorPrecise() * @see MathTrig\FloorPrecise::evaluate()
* Use the funcFloorPrecise() method in the MathTrig\FloorPrecise class instead * Use the evaluate() method in the MathTrig\FloorPrecise class instead
* *
* @param float $number Number to round * @param float $number Number to round
* @param float $significance Significance * @param float $significance Significance
@ -282,7 +282,7 @@ class MathTrig
*/ */
public static function FLOORPRECISE($number, $significance = 1) public static function FLOORPRECISE($number, $significance = 1)
{ {
return MathTrig\FloorPrecise::funcFloorPrecise($number, $significance); return MathTrig\FloorPrecise::evaluate($number, $significance);
} }
/** /**
@ -295,8 +295,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see MathTrig\IntClass::funcInt() * @see MathTrig\IntClass::evaluate()
* Use the funcInt() method in the MathTrig\IntClass class instead * Use the evaluate() method in the MathTrig\IntClass class instead
* *
* @param float $number Number to cast to an integer * @param float $number Number to cast to an integer
* *
@ -304,7 +304,7 @@ class MathTrig
*/ */
public static function INT($number) public static function INT($number)
{ {
return MathTrig\IntClass::funcInt($number); return MathTrig\IntClass::evaluate($number);
} }
/** /**
@ -344,8 +344,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @see MathTrig\Lcm::funcLcm() * @see MathTrig\Lcm::evaluate()
* Use the funcLcm() method in the MathTrig\Lcm class instead * Use the evaluate() method in the MathTrig\Lcm class instead
* *
* @param mixed ...$args Data values * @param mixed ...$args Data values
* *
@ -353,7 +353,7 @@ class MathTrig
*/ */
public static function LCM(...$args) public static function LCM(...$args)
{ {
return MathTrig\Lcm::funcLcm(...$args); return MathTrig\Lcm::evaluate(...$args);
} }
/** /**
@ -466,8 +466,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see MathTrig\Mround::funcMround() * @see MathTrig\Mround::evaluate()
* Use the funcMround() method in the MathTrig\Mround class instead * Use the evaluate() method in the MathTrig\Mround class instead
* *
* @param float $number Number to round * @param float $number Number to round
* @param int $multiple Multiple to which you want to round $number * @param int $multiple Multiple to which you want to round $number
@ -476,7 +476,7 @@ class MathTrig
*/ */
public static function MROUND($number, $multiple) public static function MROUND($number, $multiple)
{ {
return MathTrig\Mround::funcMround($number, $multiple); return MathTrig\Mround::evaluate($number, $multiple);
} }
/** /**
@ -486,8 +486,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Multinomial::funcMultinomial() * @See MathTrig\Multinomial::evaluate()
* Use the funcMultinomial method in the MathTrig\Multinomial class instead * Use the evaluate method in the MathTrig\Multinomial class instead
* *
* @param mixed[] $args An array of mixed values for the Data Series * @param mixed[] $args An array of mixed values for the Data Series
* *
@ -495,7 +495,7 @@ class MathTrig
*/ */
public static function MULTINOMIAL(...$args) public static function MULTINOMIAL(...$args)
{ {
return MathTrig\Multinomial::funcMultinomial(...$args); return MathTrig\Multinomial::evaluate(...$args);
} }
/** /**
@ -505,8 +505,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Odd::funcOdd() * @See MathTrig\Odd::evaluate()
* Use the funcOdd method in the MathTrig\Odd class instead * Use the evaluate method in the MathTrig\Odd class instead
* *
* @param float $number Number to round * @param float $number Number to round
* *
@ -514,7 +514,7 @@ class MathTrig
*/ */
public static function ODD($number) public static function ODD($number)
{ {
return MathTrig\Odd::funcOdd($number); return MathTrig\Odd::evaluate($number);
} }
/** /**
@ -544,8 +544,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Product::funcProduct() * @See MathTrig\Product::evaluate()
* Use the funcProduct method in the MathTrig\Product class instead * Use the evaluate method in the MathTrig\Product class instead
* *
* Excel Function: * Excel Function:
* PRODUCT(value1[,value2[, ...]]) * PRODUCT(value1[,value2[, ...]])
@ -556,7 +556,7 @@ class MathTrig
*/ */
public static function PRODUCT(...$args) public static function PRODUCT(...$args)
{ {
return MathTrig\Product::funcProduct(...$args); return MathTrig\Product::evaluate(...$args);
} }
/** /**
@ -567,8 +567,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Quotient::funcQuotient() * @See MathTrig\Quotient::evaluate()
* Use the funcQuotient method in the MathTrig\Quotient class instead * Use the evaluate method in the MathTrig\Quotient class instead
* *
* Excel Function: * Excel Function:
* QUOTIENT(value1[,value2[, ...]]) * QUOTIENT(value1[,value2[, ...]])
@ -580,7 +580,7 @@ class MathTrig
*/ */
public static function QUOTIENT($numerator, $denominator) public static function QUOTIENT($numerator, $denominator)
{ {
return MathTrig\Quotient::funcQuotient($numerator, $denominator); return MathTrig\Quotient::evaluate($numerator, $denominator);
} }
/** /**
@ -608,8 +608,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @Ssee MathTrig\Roman::funcRoman() * @Ssee MathTrig\Roman::evaluate()
* Use the funcRoman() method in the MathTrig\Roman class instead * Use the evaluate() method in the MathTrig\Roman class instead
* *
* @param mixed $aValue Number to convert * @param mixed $aValue Number to convert
* @param mixed $style Number indicating one of five possible forms * @param mixed $style Number indicating one of five possible forms
@ -618,7 +618,7 @@ class MathTrig
*/ */
public static function ROMAN($aValue, $style = 0) public static function ROMAN($aValue, $style = 0)
{ {
return MathTrig\Roman::funcRoman($aValue, $style); return MathTrig\Roman::evaluate($aValue, $style);
} }
/** /**
@ -628,8 +628,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @See MathTrig\RoundUp::funcRoundUp() * @See MathTrig\RoundUp::evaluate()
* Use the funcRoundUp() method in the MathTrig\RoundUp class instead * Use the evaluate() method in the MathTrig\RoundUp class instead
* *
* @param float $number Number to round * @param float $number Number to round
* @param int $digits Number of digits to which you want to round $number * @param int $digits Number of digits to which you want to round $number
@ -638,7 +638,7 @@ class MathTrig
*/ */
public static function ROUNDUP($number, $digits) public static function ROUNDUP($number, $digits)
{ {
return MathTrig\RoundUp::funcRoundUp($number, $digits); return MathTrig\RoundUp::evaluate($number, $digits);
} }
/** /**
@ -648,8 +648,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @See MathTrig\RoundDown::funcRoundDown() * @See MathTrig\RoundDown::evaluate()
* Use the funcRoundDown() method in the MathTrig\RoundDown class instead * Use the evaluate() method in the MathTrig\RoundDown class instead
* *
* @param float $number Number to round * @param float $number Number to round
* @param int $digits Number of digits to which you want to round $number * @param int $digits Number of digits to which you want to round $number
@ -658,7 +658,7 @@ class MathTrig
*/ */
public static function ROUNDDOWN($number, $digits) public static function ROUNDDOWN($number, $digits)
{ {
return MathTrig\RoundDown::funcRoundDown($number, $digits); return MathTrig\RoundDown::evaluate($number, $digits);
} }
/** /**
@ -668,8 +668,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\SeriesSum::funcSeriesSum() * @See MathTrig\SeriesSum::evaluate()
* Use the funcSeriesSum method in the MathTrig\SeriesSum class instead * Use the evaluate method in the MathTrig\SeriesSum class instead
* *
* @param mixed $x Input value * @param mixed $x Input value
* @param mixed $n Initial power * @param mixed $n Initial power
@ -680,7 +680,7 @@ class MathTrig
*/ */
public static function SERIESSUM($x, $n, $m, ...$args) public static function SERIESSUM($x, $n, $m, ...$args)
{ {
return MathTrig\SeriesSum::funcSeriesSum($x, $n, $m, ...$args); return MathTrig\SeriesSum::evaluate($x, $n, $m, ...$args);
} }
/** /**
@ -691,8 +691,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Sign::funcSign() * @See MathTrig\Sign::evaluate()
* Use the funcSign method in the MathTrig\Sign class instead * Use the evaluate method in the MathTrig\Sign class instead
* *
* @param float $number Number to round * @param float $number Number to round
* *
@ -700,7 +700,7 @@ class MathTrig
*/ */
public static function SIGN($number) public static function SIGN($number)
{ {
return MathTrig\Sign::funcSign($number); return MathTrig\Sign::evaluate($number);
} }
/** /**
@ -742,8 +742,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Subtotal::funcSubtotal() * @See MathTrig\Subtotal::evaluate()
* Use the funcSubtotal method in the MathTrig\Subtotal class instead * Use the evaluate method in the MathTrig\Subtotal class instead
* *
* @param int $functionType * @param int $functionType
* A number 1 to 11 that specifies which function to * A number 1 to 11 that specifies which function to
@ -758,7 +758,7 @@ class MathTrig
*/ */
public static function SUBTOTAL($functionType, ...$args) public static function SUBTOTAL($functionType, ...$args)
{ {
return MathTrig\Subtotal::funcSubtotal($functionType, ...$args); return MathTrig\Subtotal::evaluate($functionType, ...$args);
} }
/** /**
@ -837,8 +837,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\SumProduct::funcSumProduct() * @See MathTrig\SumProduct::evaluate()
* Use the funcSumProduct method in the MathTrig\SumProduct class instead * Use the evaluate method in the MathTrig\SumProduct class instead
* *
* @param mixed ...$args Data values * @param mixed ...$args Data values
* *
@ -846,7 +846,7 @@ class MathTrig
*/ */
public static function SUMPRODUCT(...$args) public static function SUMPRODUCT(...$args)
{ {
return MathTrig\SumProduct::funcSumProduct(...$args); return MathTrig\SumProduct::evaluate(...$args);
} }
/** /**
@ -932,8 +932,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see MathTrig\Trunc::funcTrunc() * @see MathTrig\Trunc::evaluate()
* Use the funcTrunc() method in the MathTrig\Trunc class instead * Use the evaluate() method in the MathTrig\Trunc class instead
* *
* @param float $value * @param float $value
* @param int $digits * @param int $digits
@ -942,7 +942,7 @@ class MathTrig
*/ */
public static function TRUNC($value = 0, $digits = 0) public static function TRUNC($value = 0, $digits = 0)
{ {
return MathTrig\Trunc::funcTrunc($value, $digits); return MathTrig\Trunc::evaluate($value, $digits);
} }
/** /**
@ -952,8 +952,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Sec::funcSec() * @See MathTrig\Sec::evaluate()
* Use the funcSec method in the MathTrig\Sec class instead * Use the evaluate method in the MathTrig\Sec class instead
* *
* @param float $angle Number * @param float $angle Number
* *
@ -961,7 +961,7 @@ class MathTrig
*/ */
public static function SEC($angle) public static function SEC($angle)
{ {
return MathTrig\Sec::funcSec($angle); return MathTrig\Sec::evaluate($angle);
} }
/** /**
@ -971,8 +971,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\SecH::funcSech() * @See MathTrig\SecH::evaluate()
* Use the funcSecH method in the MathTrig\Sech class instead * Use the evaluate method in the MathTrig\Sech class instead
* *
* @param float $angle Number * @param float $angle Number
* *
@ -980,7 +980,7 @@ class MathTrig
*/ */
public static function SECH($angle) public static function SECH($angle)
{ {
return MathTrig\Sech::funcSech($angle); return MathTrig\Sech::evaluate($angle);
} }
/** /**
@ -990,8 +990,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Csc::funcCsc() * @See MathTrig\Csc::evaluate()
* Use the funcCsc method in the MathTrig\Csc class instead * Use the evaluate method in the MathTrig\Csc class instead
* *
* @param float $angle Number * @param float $angle Number
* *
@ -999,7 +999,7 @@ class MathTrig
*/ */
public static function CSC($angle) public static function CSC($angle)
{ {
return MathTrig\Csc::funcCsc($angle); return MathTrig\Csc::evaluate($angle);
} }
/** /**
@ -1009,8 +1009,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Csch::funcCsch() * @See MathTrig\Csch::evaluate()
* Use the funcCsch method in the MathTrig\Csch class instead * Use the evaluate method in the MathTrig\Csch class instead
* *
* @param float $angle Number * @param float $angle Number
* *
@ -1018,7 +1018,7 @@ class MathTrig
*/ */
public static function CSCH($angle) public static function CSCH($angle)
{ {
return MathTrig\Csch::funcCsch($angle); return MathTrig\Csch::evaluate($angle);
} }
/** /**
@ -1028,8 +1028,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Cot::funcCot() * @See MathTrig\Cot::evaluate()
* Use the funcCot method in the MathTrig\Cot class instead * Use the evaluate method in the MathTrig\Cot class instead
* *
* @param float $angle Number * @param float $angle Number
* *
@ -1037,7 +1037,7 @@ class MathTrig
*/ */
public static function COT($angle) public static function COT($angle)
{ {
return MathTrig\Cot::funcCot($angle); return MathTrig\Cot::evaluate($angle);
} }
/** /**
@ -1047,8 +1047,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Coth::funcCoth() * @See MathTrig\Coth::evaluate()
* Use the funcCoth method in the MathTrig\Coth class instead * Use the evaluate method in the MathTrig\Coth class instead
* *
* @param float $angle Number * @param float $angle Number
* *
@ -1056,7 +1056,7 @@ class MathTrig
*/ */
public static function COTH($angle) public static function COTH($angle)
{ {
return MathTrig\Coth::funcCoth($angle); return MathTrig\Coth::evaluate($angle);
} }
/** /**
@ -1066,8 +1066,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Acot::funcAcot() * @See MathTrig\Acot::evaluate()
* Use the funcAcot method in the MathTrig\Acot class instead * Use the evaluate method in the MathTrig\Acot class instead
* *
* @param float $number Number * @param float $number Number
* *
@ -1075,7 +1075,7 @@ class MathTrig
*/ */
public static function ACOT($number) public static function ACOT($number)
{ {
return MathTrig\Acot::funcAcot($number); return MathTrig\Acot::evaluate($number);
} }
/** /**
@ -1102,8 +1102,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Acoth::funcAcoth() * @See MathTrig\Acoth::evaluate()
* Use the funcAcoth method in the MathTrig\Acoth class instead * Use the evaluate method in the MathTrig\Acoth class instead
* *
* @param float $number Number * @param float $number Number
* *
@ -1111,7 +1111,7 @@ class MathTrig
*/ */
public static function ACOTH($number) public static function ACOTH($number)
{ {
return MathTrig\Acoth::funcAcoth($number); return MathTrig\Acoth::evaluate($number);
} }
/** /**
@ -1121,8 +1121,8 @@ class MathTrig
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @See MathTrig\Round::builtinROUND() * @See MathTrig\Round::evaluate()
* Use the builtinRound() method in the MathTrig\Round class instead * Use the evaluate() method in the MathTrig\Round class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* @param mixed $precision Should be int * @param mixed $precision Should be int
@ -1131,7 +1131,7 @@ class MathTrig
*/ */
public static function builtinROUND($number, $precision) public static function builtinROUND($number, $precision)
{ {
return MathTrig\Round::builtinRound($number, $precision); return MathTrig\Round::evaluate($number, $precision);
} }
/** /**
@ -1158,8 +1158,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Acos::funcAcos() * @See MathTrig\Acos::evaluate()
* Use the funcAcos method in the MathTrig\Acos class instead * Use the evaluate method in the MathTrig\Acos class instead
* *
* Returns the result of builtin function acos after validating args. * Returns the result of builtin function acos after validating args.
* *
@ -1169,7 +1169,7 @@ class MathTrig
*/ */
public static function builtinACOS($number) public static function builtinACOS($number)
{ {
return MathTrig\Acos::funcAcos($number); return MathTrig\Acos::evaluate($number);
} }
/** /**
@ -1179,8 +1179,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Acosh::funcAcosh() * @See MathTrig\Acosh::evaluate()
* Use the funcAcosh method in the MathTrig\Acosh class instead * Use the evaluate method in the MathTrig\Acosh class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1188,7 +1188,7 @@ class MathTrig
*/ */
public static function builtinACOSH($number) public static function builtinACOSH($number)
{ {
return MathTrig\Acosh::funcAcosh($number); return MathTrig\Acosh::evaluate($number);
} }
/** /**
@ -1198,8 +1198,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Asin::funcAsin() * @See MathTrig\Asin::evaluate()
* Use the funcAsin method in the MathTrig\Asin class instead * Use the evaluate method in the MathTrig\Asin class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1207,7 +1207,7 @@ class MathTrig
*/ */
public static function builtinASIN($number) public static function builtinASIN($number)
{ {
return MathTrig\Asin::funcAsin($number); return MathTrig\Asin::evaluate($number);
} }
/** /**
@ -1217,8 +1217,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Asinh::funcAsinh() * @See MathTrig\Asinh::evaluate()
* Use the funcAsinh method in the MathTrig\Asinh class instead * Use the evaluate method in the MathTrig\Asinh class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1226,7 +1226,7 @@ class MathTrig
*/ */
public static function builtinASINH($number) public static function builtinASINH($number)
{ {
return MathTrig\Asinh::funcAsinh($number); return MathTrig\Asinh::evaluate($number);
} }
/** /**
@ -1236,8 +1236,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Atan::funcAtan() * @See MathTrig\Atan::evaluate()
* Use the funcAtan method in the MathTrig\Atan class instead * Use the evaluate method in the MathTrig\Atan class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1245,7 +1245,7 @@ class MathTrig
*/ */
public static function builtinATAN($number) public static function builtinATAN($number)
{ {
return MathTrig\Atan::funcAtan($number); return MathTrig\Atan::evaluate($number);
} }
/** /**
@ -1255,8 +1255,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Atanh::funcAtanh() * @See MathTrig\Atanh::evaluate()
* Use the funcAtanh method in the MathTrig\Atanh class instead * Use the evaluate method in the MathTrig\Atanh class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1264,7 +1264,7 @@ class MathTrig
*/ */
public static function builtinATANH($number) public static function builtinATANH($number)
{ {
return MathTrig\Atanh::funcAtanh($number); return MathTrig\Atanh::evaluate($number);
} }
/** /**
@ -1274,8 +1274,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Cos::funcCos() * @See MathTrig\Cos::evaluate()
* Use the funcCos method in the MathTrig\Cos class instead * Use the evaluate method in the MathTrig\Cos class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1283,7 +1283,7 @@ class MathTrig
*/ */
public static function builtinCOS($number) public static function builtinCOS($number)
{ {
return MathTrig\Cos::funcCos($number); return MathTrig\Cos::evaluate($number);
} }
/** /**
@ -1293,8 +1293,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Cosh::funcCosh() * @See MathTrig\Cosh::evaluate()
* Use the funcCosh method in the MathTrig\Cosh class instead * Use the evaluate method in the MathTrig\Cosh class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1302,7 +1302,7 @@ class MathTrig
*/ */
public static function builtinCOSH($number) public static function builtinCOSH($number)
{ {
return MathTrig\Cosh::funcCosh($number); return MathTrig\Cosh::evaluate($number);
} }
/** /**
@ -1407,8 +1407,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Sin::funcSin() * @See MathTrig\Sin::evaluate()
* Use the funcSin method in the MathTrig\Sin class instead * Use the evaluate method in the MathTrig\Sin class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1416,7 +1416,7 @@ class MathTrig
*/ */
public static function builtinSIN($number) public static function builtinSIN($number)
{ {
return MathTrig\Sin::funcSin($number); return MathTrig\Sin::evaluate($number);
} }
/** /**
@ -1426,8 +1426,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Sinh::funcSinh() * @See MathTrig\Sinh::evaluate()
* Use the funcSinh method in the MathTrig\Sinh class instead * Use the evaluate method in the MathTrig\Sinh class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1435,7 +1435,7 @@ class MathTrig
*/ */
public static function builtinSINH($number) public static function builtinSINH($number)
{ {
return MathTrig\Sinh::funcSinh($number); return MathTrig\Sinh::evaluate($number);
} }
/** /**
@ -1464,8 +1464,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Tan::funcTan() * @See MathTrig\Tan::evaluate()
* Use the funcTan method in the MathTrig\Tan class instead * Use the evaluate method in the MathTrig\Tan class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1473,7 +1473,7 @@ class MathTrig
*/ */
public static function builtinTAN($number) public static function builtinTAN($number)
{ {
return MathTrig\Tan::funcTan($number); return MathTrig\Tan::evaluate($number);
} }
/** /**
@ -1483,8 +1483,8 @@ class MathTrig
* *
* @Deprecated 1.18.0 * @Deprecated 1.18.0
* *
* @See MathTrig\Tan::funcTan() * @See MathTrig\Tan::evaluate()
* Use the funcTanh method in the MathTrig\Tanh class instead * Use the evaluate method in the MathTrig\Tanh class instead
* *
* @param mixed $number Should be numeric * @param mixed $number Should be numeric
* *
@ -1492,7 +1492,7 @@ class MathTrig
*/ */
public static function builtinTANH($number) public static function builtinTANH($number)
{ {
return MathTrig\Tanh::funcTanh($number); return MathTrig\Tanh::evaluate($number);
} }
/** /**

View File

@ -15,7 +15,7 @@ class Acos
* *
* @return float|string The arccosine of the number * @return float|string The arccosine of the number
*/ */
public static function funcAcos($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -13,9 +13,9 @@ class Acosh
* *
* @param float $number Number * @param float $number Number
* *
* @return float|string The arccosine of the number * @return float|string The arccosine of the number, or an error string
*/ */
public static function funcAcosh($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Acot
* *
* @return float|string The arccotangent of the number * @return float|string The arccotangent of the number
*/ */
public static function funcAcot($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Acoth
* *
* @return float|string The hyperbolic arccotangent of the number * @return float|string The hyperbolic arccotangent of the number
*/ */
public static function funcAcoth($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Asin
* *
* @return float|string The arcsine of the number * @return float|string The arcsine of the number
*/ */
public static function funcAsin($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Asinh
* *
* @return float|string The arc hyperbolic sine of the number * @return float|string The arc hyperbolic sine of the number
*/ */
public static function funcAsinh($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Atan
* *
* @return float|string The arctangent of the number * @return float|string The arctangent of the number
*/ */
public static function funcAtan($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -28,7 +28,7 @@ class Atan2
* *
* @return float|string the inverse tangent of the specified x- and y-coordinates, or a string containing an error * @return float|string the inverse tangent of the specified x- and y-coordinates, or a string containing an error
*/ */
public static function funcAtan2($xCoordinate, $yCoordinate) public static function evaluate($xCoordinate, $yCoordinate)
{ {
try { try {
$xCoordinate = Helpers::validateNumericNullBool($xCoordinate); $xCoordinate = Helpers::validateNumericNullBool($xCoordinate);

View File

@ -15,7 +15,7 @@ class Atanh
* *
* @return float|string The arc hyperbolic tangent of the number * @return float|string The arc hyperbolic tangent of the number
*/ */
public static function funcAtanh($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -21,7 +21,7 @@ class Base
* *
* @return string the text representation with the given radix (base) * @return string the text representation with the given radix (base)
*/ */
public static function funcBase($number, $radix, $minLength = null) public static function evaluate($number, $radix, $minLength = null)
{ {
try { try {
$number = (int) Helpers::validateNumericNullBool($number); $number = (int) Helpers::validateNumericNullBool($number);

View File

@ -23,7 +23,7 @@ class Ceiling
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcCeiling($number, $significance = null) public static function evaluate($number, $significance = null)
{ {
if ($significance === null) { if ($significance === null) {
self::floorCheck1Arg(); self::floorCheck1Arg();

View File

@ -20,7 +20,7 @@ class CeilingMath
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcCeilingMath($number, $significance = null, $mode = 0) public static function evaluate($number, $significance = null, $mode = 0)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -19,7 +19,7 @@ class CeilingPrecise
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcCeilingPrecise($number, $significance = 1) public static function evaluate($number, $significance = 1)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -31,7 +31,7 @@ class Combinations
return $e->getMessage(); return $e->getMessage();
} }
return round(Fact::funcFact($numObjs) / Fact::funcFact($numObjs - $numInSet)) / Fact::funcFact($numInSet); return round(Fact::evaluate($numObjs) / Fact::evaluate($numObjs - $numInSet)) / Fact::evaluate($numInSet);
} }
/** /**
@ -69,6 +69,6 @@ class Combinations
return $e->getMessage(); return $e->getMessage();
} }
return round(Fact::funcFact($numObjs + $numInSet - 1) / Fact::funcFact($numObjs - 1)) / Fact::funcFact($numInSet); return round(Fact::evaluate($numObjs + $numInSet - 1) / Fact::evaluate($numObjs - 1)) / Fact::evaluate($numInSet);
} }
} }

View File

@ -15,7 +15,7 @@ class Cos
* *
* @return float|string cosine * @return float|string cosine
*/ */
public static function funcCos($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Cosh
* *
* @return float|string cosine * @return float|string cosine
*/ */
public static function funcCosh($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Cot
* *
* @return float|string The cotangent of the angle * @return float|string The cotangent of the angle
*/ */
public static function funcCot($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -15,7 +15,7 @@ class Coth
* *
* @return float|string The hyperbolic cotangent of the angle * @return float|string The hyperbolic cotangent of the angle
*/ */
public static function funcCoth($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -15,7 +15,7 @@ class Csc
* *
* @return float|string The cosecant of the angle * @return float|string The cosecant of the angle
*/ */
public static function funcCsc($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -15,7 +15,7 @@ class Csch
* *
* @return float|string The hyperbolic cosecant of the angle * @return float|string The hyperbolic cosecant of the angle
*/ */
public static function funcCsch($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -22,7 +22,7 @@ class Even
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcEven($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -21,7 +21,7 @@ class Fact
* *
* @return float|int|string Factorial, or a string containing an error * @return float|int|string Factorial, or a string containing an error
*/ */
public static function funcFact($factVal) public static function evaluate($factVal)
{ {
try { try {
$factVal = Helpers::validateNumericNullBool($factVal); $factVal = Helpers::validateNumericNullBool($factVal);

View File

@ -23,12 +23,12 @@ class Floor
* Excel Function: * Excel Function:
* FLOOR(number[,significance]) * FLOOR(number[,significance])
* *
* @param float $number Number to round * @param mixed $number Expect float. Number to round
* @param float $significance Significance * @param mixed $significance Expect float. Significance
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcFloor($number, $significance = null) public static function evaluate($number, $significance = null)
{ {
if ($significance === null) { if ($significance === null) {
self::floorCheck1Arg(); self::floorCheck1Arg();

View File

@ -21,7 +21,7 @@ class FloorMath
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcFloorMath($number, $significance = null, $mode = 0) public static function evaluate($number, $significance = null, $mode = 0)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -20,7 +20,7 @@ class FloorPrecise
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcFloorPrecise($number, $significance = 1) public static function evaluate($number, $significance = 1)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -18,7 +18,7 @@ class IntClass
* *
* @return int|string Integer value, or a string containing an error * @return int|string Integer value, or a string containing an error
*/ */
public static function funcInt($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -48,7 +48,7 @@ class Lcm
* *
* @return int|string Lowest Common Multiplier, or a string containing an error * @return int|string Lowest Common Multiplier, or a string containing an error
*/ */
public static function funcLcm(...$args) public static function evaluate(...$args)
{ {
try { try {
$arrayArgs = []; $arrayArgs = [];

View File

@ -120,7 +120,7 @@ class MatrixFunctions
* *
* @return array|string The result, or a string containing an error * @return array|string The result, or a string containing an error
*/ */
public static function funcMUnit($dimension) public static function identity($dimension)
{ {
try { try {
$dimension = (int) Helpers::validateNumericNullBool($dimension); $dimension = (int) Helpers::validateNumericNullBool($dimension);

View File

@ -12,12 +12,12 @@ class Mround
* *
* Rounds a number to the nearest multiple of a specified value * Rounds a number to the nearest multiple of a specified value
* *
* @param float $number Number to round * @param mixed $number Expect float. Number to round.
* @param int $multiple Multiple to which you want to round $number * @param mixed $multiple Expect int. Multiple to which you want to round.
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcMround($number, $multiple) public static function evaluate($number, $multiple)
{ {
try { try {
$number = Helpers::validateNumericNullSubstitution($number, 0); $number = Helpers::validateNumericNullSubstitution($number, 0);

View File

@ -16,7 +16,7 @@ class Multinomial
* *
* @return float|string The result, or a string containing an error * @return float|string The result, or a string containing an error
*/ */
public static function funcMultinomial(...$args) public static function evaluate(...$args)
{ {
$summer = 0; $summer = 0;
$divisor = 1; $divisor = 1;
@ -28,13 +28,13 @@ class Multinomial
Helpers::validateNotNegative($arg); Helpers::validateNotNegative($arg);
$arg = (int) $arg; $arg = (int) $arg;
$summer += $arg; $summer += $arg;
$divisor *= Fact::funcFact($arg); $divisor *= Fact::evaluate($arg);
} }
} catch (Exception $e) { } catch (Exception $e) {
return $e->getMessage(); return $e->getMessage();
} }
$summer = Fact::funcFact($summer); $summer = Fact::evaluate($summer);
return $summer / $divisor; return $summer / $divisor;
} }

View File

@ -15,7 +15,7 @@ class Odd
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcOdd($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -18,7 +18,7 @@ class Product
* *
* @return float|string * @return float|string
*/ */
public static function funcProduct(...$args) public static function evaluate(...$args)
{ {
// Return value // Return value
$returnValue = null; $returnValue = null;

View File

@ -20,7 +20,7 @@ class Quotient
* *
* @return int|string * @return int|string
*/ */
public static function funcQuotient($numerator, $denominator) public static function evaluate($numerator, $denominator)
{ {
try { try {
$numerator = Helpers::validateNumericNullSubstitution($numerator, 0); $numerator = Helpers::validateNumericNullSubstitution($numerator, 0);

View File

@ -822,7 +822,7 @@ class Roman
* *
* @return string Roman numeral, or a string containing an error * @return string Roman numeral, or a string containing an error
*/ */
public static function funcRoman($aValue, $style = 0) public static function evaluate($aValue, $style = 0)
{ {
try { try {
$aValue = Helpers::validateNumericNullBool($aValue); $aValue = Helpers::validateNumericNullBool($aValue);

View File

@ -16,7 +16,7 @@ class Round
* *
* @return float|string Rounded number * @return float|string Rounded number
*/ */
public static function builtinROUND($number, $precision) public static function evaluate($number, $precision)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -16,7 +16,7 @@ class RoundDown
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcRoundDown($number, $digits) public static function evaluate($number, $digits)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -16,7 +16,7 @@ class RoundUp
* *
* @return float|string Rounded Number, or a string containing an error * @return float|string Rounded Number, or a string containing an error
*/ */
public static function funcRoundUp($number, $digits) public static function evaluate($number, $digits)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Sec
* *
* @return float|string The secant of the angle * @return float|string The secant of the angle
*/ */
public static function funcSec($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -15,7 +15,7 @@ class Sech
* *
* @return float|string The hyperbolic secant of the angle * @return float|string The hyperbolic secant of the angle
*/ */
public static function funcSech($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -19,7 +19,7 @@ class SeriesSum
* *
* @return float|string The result, or a string containing an error * @return float|string The result, or a string containing an error
*/ */
public static function funcSeriesSum($x, $n, $m, ...$args) public static function evaluate($x, $n, $m, ...$args)
{ {
try { try {
$x = Helpers::validateNumericNullSubstitution($x, 0); $x = Helpers::validateNumericNullSubstitution($x, 0);

View File

@ -16,7 +16,7 @@ class Sign
* *
* @return int|string sign value, or a string containing an error * @return int|string sign value, or a string containing an error
*/ */
public static function funcSign($number) public static function evaluate($number)
{ {
try { try {
$number = Helpers::validateNumericNullBool($number); $number = Helpers::validateNumericNullBool($number);

View File

@ -15,7 +15,7 @@ class Sin
* *
* @return float|string Rounded number * @return float|string Rounded number
*/ */
public static function funcSin($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -15,7 +15,7 @@ class Sinh
* *
* @return float|string Rounded number * @return float|string Rounded number
*/ */
public static function funcSinh($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -48,7 +48,7 @@ class Subtotal
[Statistical\Counts::class, 'COUNTA'], // 3 [Statistical\Counts::class, 'COUNTA'], // 3
[Statistical\Maximum::class, 'MAX'], // 4 [Statistical\Maximum::class, 'MAX'], // 4
[Statistical\Minimum::class, 'MIN'], // 5 [Statistical\Minimum::class, 'MIN'], // 5
[Product::class, 'funcProduct'], // 6 [Product::class, 'evaluate'], // 6
[Statistical\StandardDeviations::class, 'STDEV'], // 7 [Statistical\StandardDeviations::class, 'STDEV'], // 7
[Statistical\StandardDeviations::class, 'STDEVP'], // 8 [Statistical\StandardDeviations::class, 'STDEVP'], // 8
[Sum::class, 'funcSum'], // 9 [Sum::class, 'funcSum'], // 9
@ -72,7 +72,7 @@ class Subtotal
* *
* @return float|string * @return float|string
*/ */
public static function funcSubtotal($functionType, ...$args) public static function evaluate($functionType, ...$args)
{ {
$cellReference = array_pop($args); $cellReference = array_pop($args);
$aArgs = Functions::flattenArrayIndexed($args); $aArgs = Functions::flattenArrayIndexed($args);

View File

@ -16,7 +16,7 @@ class SumProduct
* *
* @return float|string The result, or a string containing an error * @return float|string The result, or a string containing an error
*/ */
public static function funcSumProduct(...$args) public static function evaluate(...$args)
{ {
$arrayList = $args; $arrayList = $args;

View File

@ -15,7 +15,7 @@ class Tan
* *
* @return float|string Rounded number * @return float|string Rounded number
*/ */
public static function funcTan($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -15,7 +15,7 @@ class Tanh
* *
* @return float|string Rounded number * @return float|string Rounded number
*/ */
public static function funcTanh($angle) public static function evaluate($angle)
{ {
try { try {
$angle = Helpers::validateNumericNullBool($angle); $angle = Helpers::validateNumericNullBool($angle);

View File

@ -16,7 +16,7 @@ class Trunc
* *
* @return float|string Truncated value, or a string containing an error * @return float|string Truncated value, or a string containing an error
*/ */
public static function funcTrunc($value = 0, $digits = 0) public static function evaluate($value = 0, $digits = 0)
{ {
try { try {
$value = Helpers::validateNumericNullBool($value); $value = Helpers::validateNumericNullBool($value);

View File

@ -703,7 +703,7 @@ class Statistical
{ {
$aArgs = Functions::flattenArray($args); $aArgs = Functions::flattenArray($args);
$aMean = MathTrig\Product::funcProduct($aArgs); $aMean = MathTrig\Product::evaluate($aArgs);
if (is_numeric($aMean) && ($aMean > 0)) { if (is_numeric($aMean) && ($aMean > 0)) {
$aCount = Counts::COUNT($aArgs); $aCount = Counts::COUNT($aArgs);
if (Minimum::MIN($aArgs) > 0) { if (Minimum::MIN($aArgs) > 0) {

View File

@ -42,12 +42,12 @@ class Poisson
$summer = 0; $summer = 0;
$floor = floor($value); $floor = floor($value);
for ($i = 0; $i <= $floor; ++$i) { for ($i = 0; $i <= $floor; ++$i) {
$summer += $mean ** $i / MathTrig\Fact::funcFact($i); $summer += $mean ** $i / MathTrig\Fact::evaluate($i);
} }
return exp(0 - $mean) * $summer; return exp(0 - $mean) * $summer;
} }
return (exp(0 - $mean) * $mean ** $value) / MathTrig\Fact::funcFact($value); return (exp(0 - $mean) * $mean ** $value) / MathTrig\Fact::evaluate($value);
} }
} }

View File

@ -38,7 +38,7 @@ class Permutations
return Functions::NAN(); return Functions::NAN();
} }
return (int) round(MathTrig\Fact::funcFact($numObjs) / MathTrig\Fact::funcFact($numObjs - $numInSet)); return (int) round(MathTrig\Fact::evaluate($numObjs) / MathTrig\Fact::evaluate($numObjs - $numInSet));
} }
/** /**

View File

@ -42,7 +42,7 @@ class Format
if ($value < 0) { if ($value < 0) {
$round = 0 - $round; $round = 0 - $round;
} }
$value = MathTrig\Mround::funcMround($value, $round); $value = MathTrig\Mround::evaluate($value, $round);
} }
$mask = "$mask;($mask)"; $mask = "$mask;($mask)";
@ -66,6 +66,8 @@ class Format
if (!is_numeric($value) || !is_numeric($decimals)) { if (!is_numeric($value) || !is_numeric($decimals)) {
return Functions::VALUE(); return Functions::VALUE();
} }
$decimals = (float) $decimals;
$value = (float) $value;
$decimals = (int) floor($decimals); $decimals = (int) floor($decimals);
$valueResult = round($value, $decimals); $valueResult = round($value, $decimals);

View File

@ -8,7 +8,7 @@ class MUnitTest extends AllSetupTeardown
{ {
public function testMUNIT(): void public function testMUNIT(): void
{ {
$identity = MatrixFunctions::funcMUnit(3); $identity = MatrixFunctions::identity(3);
self::assertEquals([[1, 0, 0], [0, 1, 0], [0, 0, 1]], $identity); self::assertEquals([[1, 0, 0], [0, 1, 0], [0, 0, 1]], $identity);
$startArray = [[1, 2, 2], [4, 5, 6], [7, 8, 9]]; $startArray = [[1, 2, 2], [4, 5, 6], [7, 8, 9]];
$resultArray = MatrixFunctions::multiply($startArray, $identity); $resultArray = MatrixFunctions::multiply($startArray, $identity);
@ -16,8 +16,8 @@ class MUnitTest extends AllSetupTeardown
$inverseArray = MatrixFunctions::inverse($startArray); $inverseArray = MatrixFunctions::inverse($startArray);
$resultArray = MatrixFunctions::multiply($startArray, $inverseArray); $resultArray = MatrixFunctions::multiply($startArray, $inverseArray);
self::assertEquals($identity, $resultArray); self::assertEquals($identity, $resultArray);
self::assertEquals('#VALUE!', MatrixFunctions::funcMUnit(0)); self::assertEquals('#VALUE!', MatrixFunctions::identity(0));
self::assertEquals('#VALUE!', MatrixFunctions::funcMUnit(-1)); self::assertEquals('#VALUE!', MatrixFunctions::identity(-1));
self::assertEquals('#VALUE!', MatrixFunctions::funcMUnit('X')); self::assertEquals('#VALUE!', MatrixFunctions::identity('X'));
} }
} }