Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rotate(coordinates,angle):
- #get the coordinates to local variables so its easyer to see whats going on
- x = coordinates['x']
- y = coordinates['y']
- X = x * math.cos(angle) - y * math.sin(angle)
- Y = x * math.sin(angle) + y * math.cos(angle)
- return {'x':X,'y':Y}
Advertisement
Add Comment
Please, Sign In to add comment