# Unessary spinning

**URL:** <https://forum.kirupa.com/t/unessary-spinning/314808>\
**Category:** Uncategorized\
**Created:** [October 9, 2010, 6:18am UTC](https://forum.kirupa.com/t/unessary-spinning/314808 "2010-10-09T06:18:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![radi](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@radi](https://forum.kirupa.com/u/radi)\
**Post date:** [October 9, 2010, 6:18am UTC](https://forum.kirupa.com/t/unessary-spinning/314808/1 "2010-10-09T06:18:31Z")

</div>

in a circle how can i tell what is the shortest path

if (team1[h].rot \> cursorDegree - 90)  
{  
team1[h].rot = team1[h].rot - 20;  
}  
if (team1[h].rot \< cursorDegree - 90)  
{  
team1[h].rot = team1[h].rot + 20;  
}

this works unless the number jumps the 0/360 gap then it will require a full counter clockwise run im wondering what i need to add to this for a more intelligent rotating of a movieclip , thanks for your help 🙂
