diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-09 20:15:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-09 20:15:00 +0400 |
commit | d25b13d13f22581b7ed107f0774d1bd8c510add4 (patch) | |
tree | e9ceca49f84a8f1091e7b8491e27243411d65ab7 /source/gameengine/GameLogic/SCA_RandomActuator.cpp | |
parent | b67a297d33dc97708940b17ca50401d9277f8bd5 (diff) |
code cleanup: double promotion warnings, also allow cmake to build SDL without audaspace.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_RandomActuator.cpp')
-rw-r--r-- | source/gameengine/GameLogic/SCA_RandomActuator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp index 2d51a45fe55..01995b13ad7 100644 --- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp +++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp @@ -220,11 +220,11 @@ bool SCA_RandomActuator::Update() * this will be quite sufficient here. */ do { - x = 2.0 * m_base->DrawFloat() - 1.0; - y = 2.0 * m_base->DrawFloat() - 1.0; - s = x*x + y*y; - } while ( (s >= 1.0) || (s == 0.0) ); - t = x * sqrt( (-2.0 * log(s)) / s); + x = 2.0f * m_base->DrawFloat() - 1.0f; + y = 2.0f * m_base->DrawFloat() - 1.0f; + s = x * x + y * y; + } while ((s >= 1.0f) || (s == 0.0f)); + t = x * sqrtf((-2.0 * log(s)) / s); tmpval = new CFloatValue(m_parameter1 + m_parameter2 * t); } } |