Find angle between 2 points using 2d coordinates.

jkvelu

New member
Joined
May 22, 2006
Messages
3
Programming Experience
Beginner
Find angle between 2 points using 2d coordinates.

I am trying to write a tool to find angle between 2 coordinates in 2d space.

I know the distance of adjacent side and hypotenuse.

Cos(angle) = adjacent side / hypotenuse

Angle = (adjacent side / hypotenuse) inverse of Cos

I exactly don’t know where to find and use the inverse function in vb.net

Your help much appreciated..

Thx
JK


 
ManicCW said:
as i remember from math inverse function of cos is sin. there is formula for that but i forgot it :(

i know the distance of Adj and hyp. i just need to find the angle between then in vb.net..

never thought it would be hard to find..
 
Math.Acos(adjacent / hypotenuse) will give you the angle in radians. Multiply the return value by (180/pi) to convert from radians to degrees.
 
Back
Top