Skip to content

Commit

Permalink
docs: clarified that angle is in radians
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmasB committed Mar 18, 2022
1 parent d8ae780 commit ca16ce0
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -33,10 +33,16 @@ public Rotation() {
setIdentity();
}

/**
* @param angle in radians
*/
public Rotation(float angle) {
set(angle);
}

/**
* @param angle in radians
*/
public Rotation set(float angle) {
s = sin(angle);
c = cos(angle);
Expand All @@ -55,6 +61,9 @@ public Rotation setIdentity() {
return this;
}

/**
* @return angle in radians
*/
public float getAngle() {
return (float) FXGLMath.atan2(s, c);
}
Expand Down

0 comments on commit ca16ce0

Please sign in to comment.