title: Calculating the angle and converting it to degrees
body: <p>I am having trouble getting an accurate angle measurement and converting it to degrees. </p>
  
  <p>I first calculated the distance with:</p>
  
  <pre><code>double distance = Math.Sqrt(deltax + deltay);
  Console.WriteLine("Distance :" + Math.Round(distance, 3));
  Console.WriteLine("");
  </code></pre>
  
  <p>Then <em>tried</em> to calculate the angle:</p>
  
  <pre><code>double angle = Math.Atan2(deltay, deltax);
  double RadiantoDegree = (angle * 180 / Math.PI);
  Math.Round((decimal)angle, 3);
  Console.WriteLine("Angle :" + angle)
  </code></pre>
  
  <p>With inputs such as x1=2, y1=2, x2=1, y2=1, the angle should measure -135.000 degrees.</p>