From 50d90c91ac66dd2416da72ef4503ce9ec64419b8 Mon Sep 17 00:00:00 2001 From: James Ward Date: Tue, 19 Mar 2024 19:06:19 +0000 Subject: [PATCH] M_PI was not defined by --- examples/glview/glview.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/glview/glview.cc b/examples/glview/glview.cc index 849dc17f..f1d32b74 100644 --- a/examples/glview/glview.cc +++ b/examples/glview/glview.cc @@ -788,8 +788,10 @@ static void QuatToAngleAxis(const std::vector quaternion, return; } + constexpr double pi = 3.14159265358979323846; + double denom = sqrt(1-qw*qw); - outAngleDegrees = angleRadians * 180.0 / M_PI; + outAngleDegrees = angleRadians * 180.0 / pi; axis[0] = qx / denom; axis[1] = qy / denom; axis[2] = qz / denom;