Fix minor int to float downcasting warnings.

metadata
Edgar Velazquez-Armendariz 2012-10-05 01:42:49 -04:00
parent 2f8d848300
commit 17da34eb15
2 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ public:
Spectrum *target = (Spectrum *) bitmap->getFloatData();
Spectrum value =
m_radiance * (2 * M_PI * (1-std::cos(m_theta))) *
(bitmap->getWidth() * bitmap->getHeight())
static_cast<Float>(bitmap->getWidth() * bitmap->getHeight())
/ (2 * M_PI * M_PI * nSamples);
for (size_t i=0; i<nSamples; ++i) {

View File

@ -173,7 +173,7 @@ public:
Spectrum value =
sunRadiance * (2 * M_PI * (1-std::cos(theta))) *
(bitmap->getWidth() * bitmap->getHeight())
static_cast<Float>(bitmap->getWidth() * bitmap->getHeight())
/ (2 * M_PI * M_PI * nSamples);
for (size_t i=0; i<nSamples; ++i) {