From ba353e276dd9680f60b4958fe053c950c77970d4 Mon Sep 17 00:00:00 2001 From: timongentzsch Date: Mon, 4 Oct 2021 17:48:16 +0000 Subject: [PATCH] Bugfix in solving quadratic equation for FoV calculation --- src/xrt/auxiliary/math/m_optics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrt/auxiliary/math/m_optics.c b/src/xrt/auxiliary/math/m_optics.c index 29349da93..f3dc04942 100644 --- a/src/xrt/auxiliary/math/m_optics.c +++ b/src/xrt/auxiliary/math/m_optics.c @@ -65,7 +65,7 @@ math_solve_triangle( /* Parts of the quadratic formula solution */ const double b = u + 1.0; - const double root = sqrt(b + 4 * u * v * v); + const double root = sqrt(b * b + 4 * u * v * v); const double two_a = 2 * v; /* The two possible solutions. */