style fixes
This commit is contained in:
parent
19fd27811d
commit
90366f9dd1
|
@ -312,14 +312,8 @@ class MathTrig
|
||||||
return Functions::VALUE();
|
return Functions::VALUE();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function evaluateGCD($a, $b) {
|
public static function evaluateGCD($a, $b)
|
||||||
// As we're just working with two values, we can use the recursive Euclidian method
|
{
|
||||||
// If we were working with more than two values, we need to extend as
|
|
||||||
// gcd(gcd(a, b), c)
|
|
||||||
// to encompass all the values we need to evaluate
|
|
||||||
// The method we're using is limited to integers, if we wanted to support floats as well
|
|
||||||
// then we'd need something like:
|
|
||||||
// return $b > .000000000001 ? gcd($b, fmod($a, $b)) : $a;
|
|
||||||
return $b ? self::evaluateGCD($b, $a % $b) : $a;
|
return $b ? self::evaluateGCD($b, $a % $b) : $a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ return [
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
2,
|
2,
|
||||||
10.5,
|
10.5,
|
||||||
2.6,
|
2.6,
|
||||||
|
@ -125,7 +125,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
13,
|
13,
|
||||||
182,
|
182,
|
||||||
481,
|
481,
|
||||||
143,
|
143,
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue