# Tan

**URL:** <https://forum.kirupa.com/t/tan/192145>\
**Category:** Uncategorized\
**Created:** [June 26, 2006, 4:10pm UTC](https://forum.kirupa.com/t/tan/192145 "2006-06-26T16:10:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mario\_hater](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mario\_hater](https://forum.kirupa.com/u/mario_hater)\
**Post date:** [June 26, 2006, 4:10pm UTC](https://forum.kirupa.com/t/tan/192145/1 "2006-06-26T16:10:42Z")

</div>

i have this code that i wrote and its supposed make the arrow point to the mouse :

onClipEvent(enterFrame){  
dx=\_root.\_xmouse-this.\_x  
dy=\_root.\_ymouse-this.\_y  
reverse=Math.tan(dy/dx)  
inverse=Math.atan(reverse)  
this.\_rotation=inverse  
}

is it because atan is not the inverse of tan or did i do something else wrong
