Skip to content

Commit a187fc0

Browse files
committed
Add Javadoc for x(), y() and z()
1 parent 2bccbd1 commit a187fc0

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

limelight/src/test/java/com/team2813/lib2813/limelight/truth/Rotation3dSubject.java

+15-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public TolerantComparison<Rotation3d> isWithin(double tolerance) {
3535
return new TolerantComparison<Rotation3d>() {
3636
@Override
3737
public void of(Rotation3d expected) {
38-
x().isWithin(tolerance).of(expected.getX());
39-
y().isWithin(tolerance).of(expected.getY());
40-
z().isWithin(tolerance).of(expected.getZ());
38+
x().isWithin(tolerance).of(expected.getX()); // roll, in radians
39+
y().isWithin(tolerance).of(expected.getY()); // pitch, in radians
40+
z().isWithin(tolerance).of(expected.getZ()); // yaw, in radians
4141
}
4242
};
4343
}
@@ -50,14 +50,26 @@ public void isZero() {
5050

5151
// Chained subjects methods below this point
5252

53+
/**
54+
* Returns a subject that can be used to make assertions about the
55+
* counterclockwise rotation angle around the X axis (roll) in radians.
56+
*/
5357
public DoubleSubject x() {
5458
return check("getX()").that(nonNullActual().getX());
5559
}
5660

61+
/**
62+
* Returns a subject that can be used to make assertions about the
63+
* counterclockwise rotation angle around the Y axis (pitch) in radians.
64+
*/
5765
public DoubleSubject y() {
5866
return check("getY()").that(nonNullActual().getY());
5967
}
6068

69+
/**
70+
* Returns a subject that can be used to make assertions about the
71+
* counterclockwise rotation angle around the Z axis (yaw) in radians.
72+
*/
6173
public DoubleSubject z() {
6274
return check("getZ()").that(nonNullActual().getZ());
6375
}

0 commit comments

Comments
 (0)