@@ -35,9 +35,9 @@ public TolerantComparison<Rotation3d> isWithin(double tolerance) {
35
35
return new TolerantComparison <Rotation3d >() {
36
36
@ Override
37
37
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
41
41
}
42
42
};
43
43
}
@@ -50,14 +50,26 @@ public void isZero() {
50
50
51
51
// Chained subjects methods below this point
52
52
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
+ */
53
57
public DoubleSubject x () {
54
58
return check ("getX()" ).that (nonNullActual ().getX ());
55
59
}
56
60
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
+ */
57
65
public DoubleSubject y () {
58
66
return check ("getY()" ).that (nonNullActual ().getY ());
59
67
}
60
68
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
+ */
61
73
public DoubleSubject z () {
62
74
return check ("getZ()" ).that (nonNullActual ().getZ ());
63
75
}
0 commit comments