title: Problems converting Java math to C#
body: <p>Math is not my strong point by any means; I had to ask around quite a bit to get a working trigonometric function working in Java. However now I'm needing the same function; However moved to C#. </p>
  
  <pre><code>private static Position a = new Position(1,1);
  private static Position b = new Position(1.5, 1.5);
  public static float getAngle(Position me, Position target) {
      float angle = (float) Math.toDegrees(Math.atan2(target.getY() - me.getY(), target.getX() - me.getX()));
      if(angle &lt; 0){
          angle += 360;
      }
      return angle;
  }
  </code></pre>
  
  <p>Looking around it doesn't even seem like C# has a ToDegrees method, I've found the Atan2 method, but without the ToDegrees I'm completely lost. </p>
  
  <p>Sorry if this is a really ridiculous question, but I'm horrible with math and don't understand all of the terminology. </p>