RedKnight91

rotation_dir(dir_prev, angle_prev, angle)

Jan 23rd, 2019
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. ///@func rotation_dir(rot_dir_current, angle_old, angle_new)
  2. ///@desc Returns 1 if an instance is rotation clockwise, -1 if it's rotating counter-clockwise
  3. ///
  4. ///@param rot_dir_current
  5. ///@param angle_old
  6. ///@param angle_new
  7.  
  8. return (argument2 == argument1) ? argument0 : (((argument2 - argument1 + 360) % 360 - 180 > 0) ? -1 : 1);
Advertisement
Add Comment
Please, Sign In to add comment