Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
54 | 21 | static public function create(float $a, float $b, float $c, float $w = 1.0): float |
|
55 | { |
||
56 | 21 | $strength = 0.0; |
|
57 | 21 | $strength += max(0.0, min(1000.0, $a * $w)) * 1000000.0; |
|
58 | 21 | $strength += max(0.0, min(1000.0, $b * $w)) * 1000.0; |
|
59 | 21 | $strength += max(0.0, min(1000.0, $c * $w)); |
|
60 | 21 | return $strength; |
|
61 | } |
||
73 | } |