title: Calculate angle with two points c#
body: <p>I have a line (DrawLine-Event) with the points (a,b) (c,d) and now I want to calculate the angle of it but I don't know how.</p>
  
  <p>I tried it like this:</p>
  
  <pre><code>double atan = ((d - b) / c - a)) * Math.PI / 180;
  double solution = Math.Atan(atan);
  int angle = Convert.ToInt32(Math.Round(solution * 180 / Math.PI));
  </code></pre>