1 | <?php |
||
10 | class Math |
||
11 | { |
||
12 | const PRECISION = 10; |
||
13 | |||
14 | /** |
||
15 | * Returns the greatest common divisor of two floats. |
||
16 | * |
||
17 | * @param float $a |
||
18 | * @param float $b |
||
19 | * |
||
20 | * @return float |
||
21 | */ |
||
22 | public static function gcd(float $a, float $b): float |
||
26 | |||
27 | /** |
||
28 | * Tests whether a float is zero. |
||
29 | * |
||
30 | * @param float $x |
||
31 | * |
||
32 | * @return bool |
||
33 | */ |
||
34 | public static function isZero(float $x): bool |
||
38 | } |
||
39 |