title: How to calculate the angle between a line and the horizontal axis?
body: <p>In a programming language (Python, C#, etc) I need to determine how to calculate the angle between a line and the horizontal axis?</p>
  
  <p>I think an image describes best what I want:</p>
  
  <p><img src="https://i.stack.imgur.com/HUKbR.png" alt="no words can describe this"></p>
  
  <p>Given (P1<sub>x</sub>,P1<sub>y</sub>) and (P2<sub>x</sub>,P2<sub>y</sub>) what is the best way to calculate this angle? The origin is in the topleft and only the positive quadrant is used.</p>