diff --git a/src/Math.php b/src/Math.php index a016f0c..399bea2 100644 --- a/src/Math.php +++ b/src/Math.php @@ -58,7 +58,7 @@ public static function solveQuadratic(float $a, float $b, float $c) : array{ if($a === 0.0){ throw new \InvalidArgumentException("Coefficient a cannot be 0!"); } - $discriminant = $b ** $b - 4 * $a * $c; + $discriminant = $b * $b - 4 * $a * $c; if($discriminant > 0){ //2 real roots $sqrtDiscriminant = sqrt($discriminant); return [