Fix a couple of methods that call mathods that we've modified

This commit is contained in:
MarkBaker 2021-05-14 12:52:17 +02:00 committed by Mark Baker
parent 5173eaa302
commit 924cfe2e7b
9 changed files with 34 additions and 34 deletions

View File

@ -1624,12 +1624,12 @@ class Calculation
], ],
'MAX' => [ 'MAX' => [
'category' => Category::CATEGORY_STATISTICAL, 'category' => Category::CATEGORY_STATISTICAL,
'functionCall' => [Statistical\Maximum::class, 'MAX'], 'functionCall' => [Statistical\Maximum::class, 'max'],
'argumentCount' => '1+', 'argumentCount' => '1+',
], ],
'MAXA' => [ 'MAXA' => [
'category' => Category::CATEGORY_STATISTICAL, 'category' => Category::CATEGORY_STATISTICAL,
'functionCall' => [Statistical\Maximum::class, 'MAXA'], 'functionCall' => [Statistical\Maximum::class, 'maxA'],
'argumentCount' => '1+', 'argumentCount' => '1+',
], ],
'MAXIFS' => [ 'MAXIFS' => [
@ -1669,12 +1669,12 @@ class Calculation
], ],
'MIN' => [ 'MIN' => [
'category' => Category::CATEGORY_STATISTICAL, 'category' => Category::CATEGORY_STATISTICAL,
'functionCall' => [Statistical\Minimum::class, 'MIN'], 'functionCall' => [Statistical\Minimum::class, 'min'],
'argumentCount' => '1+', 'argumentCount' => '1+',
], ],
'MINA' => [ 'MINA' => [
'category' => Category::CATEGORY_STATISTICAL, 'category' => Category::CATEGORY_STATISTICAL,
'functionCall' => [Statistical\Minimum::class, 'MINA'], 'functionCall' => [Statistical\Minimum::class, 'minA'],
'argumentCount' => '1+', 'argumentCount' => '1+',
], ],
'MINIFS' => [ 'MINIFS' => [

View File

@ -39,7 +39,7 @@ class DMax extends DatabaseAbstract
return null; return null;
} }
return Maximum::MAX( return Maximum::max(
self::getFilteredColumn($database, $field, $criteria) self::getFilteredColumn($database, $field, $criteria)
); );
} }

View File

@ -39,7 +39,7 @@ class DMin extends DatabaseAbstract
return null; return null;
} }
return Minimum::MIN( return Minimum::min(
self::getFilteredColumn($database, $field, $criteria) self::getFilteredColumn($database, $field, $criteria)
); );
} }

View File

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

View File

@ -55,8 +55,8 @@ class Subtotal
1 => [Statistical\Averages::class, 'average'], 1 => [Statistical\Averages::class, 'average'],
[Statistical\Counts::class, 'COUNT'], // 2 [Statistical\Counts::class, 'COUNT'], // 2
[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
[Operations::class, 'product'], // 6 [Operations::class, 'product'], // 6
[Statistical\StandardDeviations::class, 'STDEV'], // 7 [Statistical\StandardDeviations::class, 'STDEV'], // 7
[Statistical\StandardDeviations::class, 'STDEVP'], // 8 [Statistical\StandardDeviations::class, 'STDEVP'], // 8

View File

@ -942,20 +942,20 @@ class Statistical
* with negative numbers considered smaller than positive numbers. * with negative numbers considered smaller than positive numbers.
* *
* Excel Function: * Excel Function:
* MAX(value1[,value2[, ...]]) * max(value1[,value2[, ...]])
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see Statistical\Maximum::MAX()
* Use the MAX() method in the Statistical\Maximum class instead
*
* @param mixed ...$args Data values * @param mixed ...$args Data values
* *
* @return float * @return float
*@see Statistical\Maximum::max()
* Use the MAX() method in the Statistical\Maximum class instead
*
*/ */
public static function MAX(...$args) public static function MAX(...$args)
{ {
return Maximum::MAX(...$args); return Maximum::max(...$args);
} }
/** /**
@ -964,20 +964,20 @@ class Statistical
* Returns the greatest value in a list of arguments, including numbers, text, and logical values * Returns the greatest value in a list of arguments, including numbers, text, and logical values
* *
* Excel Function: * Excel Function:
* MAXA(value1[,value2[, ...]]) * maxA(value1[,value2[, ...]])
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see Statistical\Maximum::MAXA()
* Use the MAXA() method in the Statistical\Maximum class instead
*
* @param mixed ...$args Data values * @param mixed ...$args Data values
* *
* @return float * @return float
*@see Statistical\Maximum::maxA()
* Use the MAXA() method in the Statistical\Maximum class instead
*
*/ */
public static function MAXA(...$args) public static function MAXA(...$args)
{ {
return Maximum::MAXA(...$args); return Maximum::maxA(...$args);
} }
/** /**
@ -1035,16 +1035,16 @@ class Statistical
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see Statistical\Minimum::MIN()
* Use the MIN() method in the Statistical\Minimum class instead
*
* @param mixed ...$args Data values * @param mixed ...$args Data values
* *
* @return float * @return float
*@see Statistical\Minimum::min()
* Use the min() method in the Statistical\Minimum class instead
*
*/ */
public static function MIN(...$args) public static function MIN(...$args)
{ {
return Minimum::MIN(...$args); return Minimum::min(...$args);
} }
/** /**
@ -1057,16 +1057,16 @@ class Statistical
* *
* @Deprecated 1.17.0 * @Deprecated 1.17.0
* *
* @see Statistical\Minimum::MINA()
* Use the MINA() method in the Statistical\Minimum class instead
*
* @param mixed ...$args Data values * @param mixed ...$args Data values
* *
* @return float * @return float
*@see Statistical\Minimum::minA()
* Use the minA() method in the Statistical\Minimum class instead
*
*/ */
public static function MINA(...$args) public static function MINA(...$args)
{ {
return Minimum::MINA(...$args); return Minimum::minA(...$args);
} }
/** /**

View File

@ -28,10 +28,10 @@ class Mean
{ {
$aArgs = Functions::flattenArray($args); $aArgs = Functions::flattenArray($args);
$aMean = MathTrig\Product::evaluate($aArgs); $aMean = MathTrig\Operations::product($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) {
return $aMean ** (1 / $aCount); return $aMean ** (1 / $aCount);
} }
} }
@ -56,7 +56,7 @@ class Mean
{ {
// Loop through arguments // Loop through arguments
$aArgs = Functions::flattenArray($args); $aArgs = Functions::flattenArray($args);
if (Minimum::MIN($aArgs) < 0) { if (Minimum::min($aArgs) < 0) {
return Functions::NAN(); return Functions::NAN();
} }

View File

@ -19,7 +19,7 @@ class Maximum extends MaxMinBase
* *
* @return float * @return float
*/ */
public static function MAX(...$args) public static function max(...$args)
{ {
$returnValue = null; $returnValue = null;
@ -53,7 +53,7 @@ class Maximum extends MaxMinBase
* *
* @return float * @return float
*/ */
public static function MAXA(...$args) public static function maxA(...$args)
{ {
$returnValue = null; $returnValue = null;

View File

@ -19,7 +19,7 @@ class Minimum extends MaxMinBase
* *
* @return float * @return float
*/ */
public static function MIN(...$args) public static function min(...$args)
{ {
$returnValue = null; $returnValue = null;
@ -53,7 +53,7 @@ class Minimum extends MaxMinBase
* *
* @return float * @return float
*/ */
public static function MINA(...$args) public static function minA(...$args)
{ {
$returnValue = null; $returnValue = null;