Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function velocityToSpeeds(direction, speed) {
- return {
- x: -speed*Math.sin(Math.toRad(direction - 90)),
- y: -speed*Math.cos(Math.toRad(direction - 90))
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement