use cmath and C++ (std::) versions of functions

This commit is contained in:
Eshed
2016-10-15 03:29:45 +03:00
parent ccf32aaf57
commit 25cda401c5
12 changed files with 26 additions and 27 deletions
+2 -2
View File
@@ -710,8 +710,8 @@ static void ReadLightInfo(aiLight* light, StreamReaderLE* stream)
// OpenGL: I = cos(angle)^E
// Solving: angle = acos(I^(1/E))
ai_real E = 1.0 / std::max(spotExponent, (ai_real)0.00001);
ai_real inner = acos(pow((ai_real)0.99, E));
ai_real outer = acos(pow((ai_real)0.01, E));
ai_real inner = std::acos(std::pow((ai_real)0.99, E));
ai_real outer = std::acos(std::pow((ai_real)0.01, E));
// Apply the cutoff.
outer = std::min(outer, AI_DEG_TO_RAD(spotCutoff));