summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/modules/interpreter/ball_tracker.c
diff options
context:
space:
mode:
authorsicarius <devnull@localhost>2007-02-22 14:12:03 +0100
committersicarius <devnull@localhost>2007-02-22 14:12:03 +0100
commit655dd7522fb60e2ef0e68437337178184109f347 (patch)
treebebff27847c72ebf4be3d763f1da4f66d704dffa /source/Concept/Framework/modules/interpreter/ball_tracker.c
parent9525458918383afbf324854fc2130d3740154da3 (diff)
downloadrc2007-soccer-655dd7522fb60e2ef0e68437337178184109f347.tar
rc2007-soccer-655dd7522fb60e2ef0e68437337178184109f347.zip
Codework
Diffstat (limited to 'source/Concept/Framework/modules/interpreter/ball_tracker.c')
-rwxr-xr-xsource/Concept/Framework/modules/interpreter/ball_tracker.c7
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
{