# Problems with angles

**URL:** https://forum.kirupa.com/t/problems-with-angles/123596
**Category:** Uncategorized
**Created:** [September 25, 2004, 1:56am UTC](https://forum.kirupa.com/t/problems-with-angles/123596 "2004-09-25T01:56:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Scooterman](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Scooterman](https://forum.kirupa.com/u/Scooterman)
#### Post date: [September 25, 2004, 1:56am UTC](https://forum.kirupa.com/t/problems-with-angles/123596/1 "2004-09-25T01:56:00Z")

</div>

Hi, I am trying to make a small movieclip that rotate itself based on the mouse coordinates while pressed. But the problem is, using the Math.sin function, when I pass the result to angle it won´t go to far than 50 degrees where it should be 90. What´s the matter?  
My code

on(press){  
isActing = True;  
}

onClipEvent(enterFrame){

if (isActing == True){  
//This is to get the real coordinates based on the movieclip position  
tx = \_root.\_xmouse - this.\_x;  
ty = - (\_root.ymouse - this.\_y); // y is inverted in flash

```
hyp = Math.sqrt(tx*tx + ty*ty);

sin = Math.sin(ty/hyp);
angle = 180 * sin / Math.PI;

```

}  
}

I was planing to get a base angle and the current mouse angle and then subtract they by rotating the movieclip. But so I´ve got the angle problem. How do I fix it??

Thx, Scooterman
