We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6031170 + 1bcd93a commit a26583fCopy full SHA for a26583f
utils/math_functions.py
@@ -211,9 +211,9 @@ def direction(vector):
211
return math.atan2(vector.y, vector.x)
212
213
214
-def getPointBehindTheBall(point, theta):
215
- x = point.x - (3.5 * BOT_RADIUS) * (math.cos(theta))
216
- y = point.y - (3.5 * BOT_RADIUS) * (math.sin(theta))
+def getPointBehindTheBall(point, theta, factor=3.5):
+ x = point.x + (factor * BOT_RADIUS) * (math.cos(theta))
+ y = point.y + (factor * BOT_RADIUS) * (math.sin(theta))
217
return Vector2D(int(x), int(y))
218
219
def getPointToGo(point, theta):
@@ -244,12 +244,6 @@ def stan_inverse(self,y,x):
244
else:
245
return atan2(y,x)+3.14159265
246
247
-
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))
251
- return Vector2D(int(x), int(y))
252
253
def vicinity_points(point1, point2, thresh=10):
254
return dist(point1, point2) < thresh
255
0 commit comments