/** * Solve the equation. * * Does not return any values, but holds them for later retrieval. */ public function solve() { $a = $this->equation->getA(); $b = $this->equation->getB(); $c = $this->equation->getC(); if ($this->getBsmfac($a, $b, $c) < 0) { $roots = $this->findImaginaryRoots($a, $b, $c); } else { $roots = $this->findRealRoots($a, $b, $c); } $roots = $this->orderRoots($roots); $this->saveRootsAsStrings($roots); }