diff --git a/src/nvmath/Random.cpp b/src/nvmath/Random.cpp index a905d3e..6178134 100644 --- a/src/nvmath/Random.cpp +++ b/src/nvmath/Random.cpp @@ -15,7 +15,7 @@ const uint16 Rand48::c0 = 0x000B; /// Get a random seed based on the current time. uint Rand::randomSeed() { - return time(NULL); + return (uint)time(NULL); } diff --git a/src/nvmath/SphericalHarmonic.cpp b/src/nvmath/SphericalHarmonic.cpp index 568660d..f005b51 100644 --- a/src/nvmath/SphericalHarmonic.cpp +++ b/src/nvmath/SphericalHarmonic.cpp @@ -64,7 +64,7 @@ namespace // Rule 2 needs no previous results if (l == m) { - return powf(-1.0f, m) * doubleFactorial(2 * m - 1) * powf(1 - x*x, 0.5f * m); + return powf(-1.0f, float(m)) * doubleFactorial(2 * m - 1) * powf(1 - x*x, 0.5f * m); } // Rule 3 requires the result for the same argument of the previous band