mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
22 lines
338 B
PHP
22 lines
338 B
PHP
<?php
|
|
namespace phpOMS\Math;
|
|
|
|
class Functions
|
|
{
|
|
public static function getGammaInteger(\int $k)
|
|
{
|
|
return self::fact($k-1);
|
|
}
|
|
|
|
public static function fact(\int $n, \int $start = 1)
|
|
{
|
|
$fact = 1;
|
|
|
|
for($i = $start; $i < $n; $i++) {
|
|
$fact *= $i;
|
|
}
|
|
|
|
return $fact;
|
|
}
|
|
}
|