Skip to content

Commit 6031170

Browse files
authored
Merge pull request #67 from ultrainstinct30/VariableThresh
Made threshold in getPointBehindBall function variable
2 parents fbb88a3 + fa54e17 commit 6031170

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/math_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ def stan_inverse(self,y,x):
245245
return atan2(y,x)+3.14159265
246246

247247

248-
def getPointBehindTheBall(point ,theta):
249-
x = point.x -(3.5 * BOT_RADIUS) *(math.cos(theta))
250-
y = point.y -(3.5 * BOT_RADIUS) *(math.sin(theta))
248+
def getPointBehindTheBall(point ,theta, factor=3.5):
249+
x = point.x +(factor * BOT_RADIUS) *(math.cos(theta))
250+
y = point.y +(factor * BOT_RADIUS) *(math.sin(theta))
251251
return Vector2D(int(x), int(y))
252252

253253
def vicinity_points(point1, point2, thresh=10):

0 commit comments

Comments
 (0)