ne_ziggy

offsetDirection

Apr 4th, 2012
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function offsetDirection(angle) {
  2.     var radians = -angle * (Math.PI / 180);
  3.     var offset = [];
  4.     offset[0] = Math.cos(radians);
  5.     offset[1] = Math.sin(radians);
  6.     return offset;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment