diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-06 02:12:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-06 02:12:17 +0400 |
commit | cb0b3558af3a5544a08513a7a0a7354502af0eaf (patch) | |
tree | 4854168bf000ea35f0e7203482a394de06b798ab /source/gameengine/GameLogic | |
parent | 6cff0b71a770a23847e94520adecf9f8639c7e2b (diff) |
style cleanup
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r-- | source/gameengine/GameLogic/SCA_PropertySensor.cpp | 8 | ||||
-rw-r--r-- | source/gameengine/GameLogic/SCA_RandomActuator.cpp | 9 |
2 files changed, 7 insertions, 10 deletions
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp index d0d940a2e42..ce183b37498 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp +++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp @@ -91,10 +91,10 @@ void SCA_PropertySensor::PrecalculateRangeExpression() //The context is needed to retrieve the property at runtime but it creates //loop of references pars.SetContext(this->AddRef()); - STR_String checkstr = "(" + m_checkpropval + " <= " - + m_checkpropname + ") && ( " - + m_checkpropname + " <= " - + m_checkpropmaxval + ")"; + STR_String checkstr = ("(" + m_checkpropval + " <= " + + m_checkpropname + ") && ( " + + m_checkpropname + " <= " + + m_checkpropmaxval + ")"); m_range_expr = pars.ProcessText(checkstr); } diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp index 40dba3bf03a..b0fc1431482 100644 --- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp +++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp @@ -141,8 +141,7 @@ bool SCA_RandomActuator::Update() int res; /* The [0, 1] interval is projected onto the [min, max+1] domain, */ /* and then rounded. */ - res = (int) floor( ((m_parameter2 - m_parameter1 + 1) * m_base->DrawFloat()) - + m_parameter1); + res = (int)floor( ((m_parameter2 - m_parameter1 + 1) * m_base->DrawFloat()) + m_parameter1); tmpval = new CIntValue(res); } break; @@ -172,8 +171,7 @@ bool SCA_RandomActuator::Update() } break; case KX_RANDOMACT_FLOAT_UNIFORM: { - float res = ((m_parameter2 - m_parameter1) * m_base->DrawFloat()) - + m_parameter1; + float res = ((m_parameter2 - m_parameter1) * m_base->DrawFloat()) + m_parameter1; tmpval = new CFloatValue(res); } break; @@ -239,8 +237,7 @@ bool SCA_RandomActuator::Update() /* controlling parameter. Using the 'normal' exponent is not very */ /* intuitive... */ /* tmpval = new CFloatValue( (1.0 / m_parameter1) */ - tmpval = new CFloatValue( (m_parameter1) - * (-log(1.0 - m_base->DrawFloat())) ); + tmpval = new CFloatValue((m_parameter1) * (-log(1.0 - m_base->DrawFloat()))); } break; |