| 1 |
<?php |
| 2 |
|
| 3 |
// Range function (Specific to TablePress). |
| 4 |
|
| 5 |
namespace TablePress\PhpOffice\PhpSpreadsheet\Calculation\Statistical; |
| 6 |
|
| 7 |
use TablePress\PhpOffice\PhpSpreadsheet\Calculation\Functions; |
| 8 |
|
| 9 |
class Range |
| 10 |
{ |
| 11 |
/** |
| 12 |
* Range (Specific to TablePress). |
| 13 |
* |
| 14 |
* Calculates the range of numbers, which is the difference of the maximum minus the minimum of the numbers. |
| 15 |
* |
| 16 |
* @param mixed $args Data values. |
| 17 |
* @return float Range of the values (max - min). |
| 18 |
*/ |
| 19 |
public static function RANGE( ...$args ) { |
| 20 |
return Maximum::max( ...$args ) - Minimum::min( ...$args ); |
| 21 |
} |
| 22 |
} |
| 23 |
|