mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-04-23 06:29:54 +08:00
M_PI was not defined by <cmath>
This commit is contained in:
parent
4bfc1fc180
commit
50d90c91ac
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user