Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GameLogic/SCA_RandomActuator.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index 3a6b00198e1..c9d11a27c76 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -152,7 +152,7 @@ bool SCA_RandomActuator::Update()
/* If x_1, x_2, ... is a sequence of random numbers with uniform */
/* distribution between zero and one, k is the first integer for */
/* which the product x_1*x_2*...*x_k < exp(-\lamba). */
- float a = 0.0, b = 0.0;
+ float a, b;
int res = 0;
/* The - sign is important here! The number to test for, a, must be */
/* between 0 and 1. */
@@ -207,10 +207,10 @@ bool SCA_RandomActuator::Update()
sensible values. The termination condition states two
things:
1. s >= 0 is not allowed: to prevent the distro from
- getting a bias towards high values. This is a small
+ getting a bias towards high values. This is a small
correction, really, and might also be left out.
2. s == 0 is not allowed: to prevent a division by zero
- when renormalising the drawn value to the desired
+ when renormalising the drawn value to the desired
distribution shape. As a side effect, the distro will
never yield the exact mean.
I am not sure whether this is consistent, since the error