Advertisement
nein_yards

Untitled

Dec 22nd, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. elif action in 'LR':
  2. if action == 'L':
  3. angle = math.radians(value)
  4. elif action == 'R':
  5. angle = math.radians(-value)
  6. a = np.array([[w_x, w_y]]).reshape(2, 1)
  7. b = np.array([[math.cos(angle), -math.sin(angle)],
  8. [math.sin(angle), math.cos(angle)]])
  9. w_x, w_y = [np.matmul(b, a).item(i) for i in [0, 1]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement