Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

How to calculate bearing in c#?

$
0
0

If I have two points (x1, y1) and (x2, y2) how do I calculate their bearing relative to the Y axis (0 degrees)?

For example, in the graphic below:

I would want the answer to be 50 degrees (I'm just guessing that's about 50 degrees, but you get the point).

I've seen a lot of stuff searching, but it doesn't seem to work or leaves me more confused then when I started.

Thanks!


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>