Skip to content

Commit

Permalink
Merge pull request #475 from jam3sward/issue-474
Browse files Browse the repository at this point in the history
M_PI was not defined by <cmath>
  • Loading branch information
syoyo authored Mar 20, 2024
2 parents 4bfc1fc + 50d90c9 commit b132612
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/glview/glview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,10 @@ static void QuatToAngleAxis(const std::vector<double> 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;
Expand Down

0 comments on commit b132612

Please sign in to comment.