Advertisement
FatalSleep

Untitled

Jul 5th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. //fixrot( rotation ); <-- version 2
  2. if ( argument0 >= 0 ) {
  3. return argument0 mod 360;
  4. } else {
  5. return 360 + ( argument0 mod -360 );
  6. }
  7.  
  8. //fixrot( rotation ); <-- version 1;
  9. var fix = argument0;
  10.  
  11. while( fix >= 360 || fix < 0 ) {
  12. fix += ( ( fix < 0 ) * 360 ) + ( ( fix >= 360 ) * -360 );
  13. };
  14.  
  15. return fix;
  16.  
  17. // ... module makes a HUGE difference...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement