Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | abstract class MathUtils |
||
8 | { |
||
9 | /** |
||
10 | * Rounds a $number adding decimal part only when int part of $number < $idealLength. |
||
11 | * |
||
12 | * @param float $number |
||
13 | * @param int $idealLength |
||
14 | * |
||
15 | * @return float |
||
16 | */ |
||
17 | public static function smartRound(float $number, int $idealLength = 3): float |
||
33 |