Angle Between Two Points ?

BlitzMax Forums/BlitzMax Beginners Area/Angle Between Two Points ?

GregBUG(Posted 2005) [#1]
Hi!

how can i calculate the angle between two points?

my math and trigonometry is rusty! ;)

thanks!


Qweeg(Posted 2005) [#2]
Can you use ATAN2? Something like:
angle# = ATan2(x1-x2,y1-y2) 



GregBUG(Posted 2005) [#3]
thanks!


FlameDuck(Posted 2005) [#4]
Actually it's ATan2(dy , dx) where dy = y2 - y1 and dx = x2 - x1, or ATan(dy / dx)


tonyg(Posted 2005) [#5]
In fact ATAN2 is a good example of Bmax Vs B3D doc.
I'm guessing they work the same.


Leiden(Posted 2005) [#6]
Wow, this brings back memories, I was doing this in math about 2 weeks ago... memories... bad math memories!? Aargh XD


Red(Posted 2005) [#7]
math.mod tweaks : http://www.blitzbasic.com/Community/posts.php?topic=47408&hl=math


FlameDuck(Posted 2005) [#8]
Wow, this brings back memories, I was doing this in math about 2 weeks ago... memories... bad math memories!? Aargh XD
It gets worse. Trust me, in just a couple of years, you'll be wishing everything was as easy as trigonometry.