title: Get angle between 2 points
body: <p>There's a player. While moving cursor Id like to get angle between player and cursor. My code for this is :</p>
  
  <pre><code>public void mouseMoved(MouseEvent ev) {
      float angle = (float) Math.toDegrees(Math.atan2(ev.getX() - player.getCenterX(),
              ev.getY() - player.getCenterY()));
      if (angle &lt; 0) {
          angle += 360;
      }
      System.out.println(angle);
  }
  </code></pre>
  
  <p>But it doesnt return correct values. How to modify it to return correct values?</p>