mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Fix calculation
This commit is contained in:
parent
f9296042ae
commit
7613a42504
|
|
@ -52,11 +52,11 @@ class Average
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function averageChange(array $x, int $h = 1) : float
|
||||
public static function averageDatasetChange(array $x, int $h = 1) : float
|
||||
{
|
||||
$count = count($x);
|
||||
|
||||
return $x[$count - 1] + $h * ($x[$count - 1] - $x[0]) / ($count - 1);
|
||||
return $h * ($x[$count - 1] - $x[0]) / ($count - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class MeasureOfDispersion
|
|||
$end = end($values);
|
||||
$start = reset($values);
|
||||
|
||||
return $start - $end;
|
||||
return $end - $start;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user