From 8a2272ba0018c5fef569c8eaf79a3f5331708a93 Mon Sep 17 00:00:00 2001 From: Akmal Fairuz <35138228+AkmalFairuz@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:03:55 +0700 Subject: [PATCH] fix typo --- src/Math.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 [