Skip to content

Commit ca16ce0

Browse files
committed
docs: clarified that angle is in radians
1 parent d8ae780 commit ca16ce0

File tree

1 file changed

+9
-0
lines changed
  • fxgl-entity/src/main/java/com/almasb/fxgl/physics/box2d/common

1 file changed

+9
-0
lines changed

fxgl-entity/src/main/java/com/almasb/fxgl/physics/box2d/common/Rotation.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,16 @@ public Rotation() {
3333
setIdentity();
3434
}
3535

36+
/**
37+
* @param angle in radians
38+
*/
3639
public Rotation(float angle) {
3740
set(angle);
3841
}
3942

43+
/**
44+
* @param angle in radians
45+
*/
4046
public Rotation set(float angle) {
4147
s = sin(angle);
4248
c = cos(angle);
@@ -55,6 +61,9 @@ public Rotation setIdentity() {
5561
return this;
5662
}
5763

64+
/**
65+
* @return angle in radians
66+
*/
5867
public float getAngle() {
5968
return (float) FXGLMath.atan2(s, c);
6069
}

0 commit comments

Comments
 (0)