diff options
author | sicarius <devnull@localhost> | 2007-02-22 14:12:03 +0100 |
---|---|---|
committer | sicarius <devnull@localhost> | 2007-02-22 14:12:03 +0100 |
commit | 655dd7522fb60e2ef0e68437337178184109f347 (patch) | |
tree | bebff27847c72ebf4be3d763f1da4f66d704dffa /source/Concept/Framework/modules/interpreter/ball_tracker.c | |
parent | 9525458918383afbf324854fc2130d3740154da3 (diff) | |
download | rc2007-soccer-655dd7522fb60e2ef0e68437337178184109f347.tar rc2007-soccer-655dd7522fb60e2ef0e68437337178184109f347.zip |
Codework
Diffstat (limited to 'source/Concept/Framework/modules/interpreter/ball_tracker.c')
-rwxr-xr-x | source/Concept/Framework/modules/interpreter/ball_tracker.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/Concept/Framework/modules/interpreter/ball_tracker.c b/source/Concept/Framework/modules/interpreter/ball_tracker.c index 1701121..2d85b96 100755 --- a/source/Concept/Framework/modules/interpreter/ball_tracker.c +++ b/source/Concept/Framework/modules/interpreter/ball_tracker.c @@ -109,9 +109,16 @@ void Ball_Tracker::Update() break;
}
+ if(fabs(mainDirection - secondDirection) > PI)
+ {
+ min(mainDirection, secondDirection) += 2.0f * PI;
+ }
+
direction = (intensity[greatestIntensity] * mainDirection +
intensity[secondIntensity] * secondDirection) /
(intensity[greatestIntensity] + intensity[secondIntensity]);
+
+ direction = easyAngle(direction);
}
else
{
|