From 3f30093d0232287c006fb3750df6697c47edadfd Mon Sep 17 00:00:00 2001 From: castano Date: Mon, 17 Dec 2007 06:27:17 +0000 Subject: [PATCH] Fix warnings. --- src/nvmath/Random.cpp | 2 +- src/nvmath/SphericalHarmonic.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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