# Angle between two mc's

**URL:** <https://forum.kirupa.com/t/angle-between-two-mcs/205867>\
**Category:** Uncategorized\
**Created:** [November 2, 2006, 7:47pm UTC](https://forum.kirupa.com/t/angle-between-two-mcs/205867 "2006-11-02T19:47:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VoS](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@VoS](https://forum.kirupa.com/u/VoS)\
**Post date:** [November 2, 2006, 7:47pm UTC](https://forum.kirupa.com/t/angle-between-two-mcs/205867/1 "2006-11-02T19:47:50Z")

</div>

hey  
trying to calculate angel between two mc’s  
came up with this  
ActionScript Code:  
[FONT=Courier New][LEFT][COLOR=#000000] **function** [/COLOR] angle[COLOR=#000000]([/COLOR]ob1, ob2[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#000000] **var** [/COLOR] o1 = [COLOR=#0000FF]eval[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000] **var** [/COLOR] o2 = [COLOR=#0000FF]eval[/COLOR]COLOR=#000000[/COLOR];  
xDist = o1.\_x-o2.[COLOR=#0000FF]\_x[/COLOR];  
yDist = o1.\_y-o2.[COLOR=#0000FF]\_y[/COLOR];  
[COLOR=#0000FF]return[/COLOR] COLOR=#000000[/COLOR]-[COLOR=#000080]90[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]

but there seems to be something wrong with that  
its only returning negative angels

any ideas whats wrong with it?
