diff --git a/libs/geom/include/psemek/geom/math.hpp b/libs/geom/include/psemek/geom/math.hpp index 8eea2b31..6b5a69f6 100644 --- a/libs/geom/include/psemek/geom/math.hpp +++ b/libs/geom/include/psemek/geom/math.hpp @@ -40,7 +40,7 @@ namespace psemek::geom auto const D = b * b - 4 * a * c; if (D < 0) return std::nullopt; - auto t = - (b + (b > 0 ? 1 : -1) * std::sqrt(D)); + auto t = - (b + (b > 0 ? 1 : -1) * std::sqrt(D)) / 2; auto x1 = t / a; auto x2 = c / t;