diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation3d.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation3d.java index 952cd5c38c..171902f248 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation3d.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation3d.java @@ -278,13 +278,14 @@ public class Rotation3d implements Interpolatable { } /** - * Adds the new rotation to the current rotation. The other rotation is applied intrinsically, - * which means that it rotates around the axes after applying this rotation. For example, {@code - * new Rotation3d(Units.degreesToRadians(90), 0, 0).rotateBy(new Rotation3d(0, - * Units.degreesToRadians(90), 0))} rotates by 90 degrees around the +X axis and then by 90 - * degrees around the new +Y axis (which has been moved to the +Z axis). + * Adds the new rotation to the current rotation. The other rotation is applied extrinsically, + * which means that it rotates around the global axes. For example, {@code new + * Rotation3d(Units.degreesToRadians(90), 0, 0).rotateBy(new Rotation3d(0, + * Units.degreesToRadians(45), 0))} rotates by 90 degrees around the +X axis and then by 45 + * degrees around the global +Y axis. (This is equivalent to {@code new + * Rotation3d(Units.degreesToRadians(90), Units.degreesToRadians(45), 0)}) * - * @param other The intrinsic rotation to rotate by. + * @param other The extrinsic rotation to rotate by. * @return The new rotated Rotation3d. */ public Rotation3d rotateBy(Rotation3d other) { diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/Transform2d.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/Transform2d.java index c7a5c3e689..ecead7405d 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/Transform2d.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/Transform2d.java @@ -67,7 +67,8 @@ public class Transform2d { } /** - * Composes two transformations. + * Composes two transformations. The second transform is applied relative to the orientation of + * the first. * * @param other The transform to compose with this one. * @return The composition of the two transformations. diff --git a/wpimath/src/main/native/include/frc/geometry/Rotation3d.h b/wpimath/src/main/native/include/frc/geometry/Rotation3d.h index 31f67e0cf8..e49787073a 100644 --- a/wpimath/src/main/native/include/frc/geometry/Rotation3d.h +++ b/wpimath/src/main/native/include/frc/geometry/Rotation3d.h @@ -139,12 +139,12 @@ class WPILIB_DLLEXPORT Rotation3d { /** * Adds the new rotation to the current rotation. The other rotation is - * applied intrinsically, which means that it rotates around the axes after - * applying this rotation. For example, Rotation3d{90_deg, 0, 0}.RotateBy( - * Rotation3d{0, 90_deg, 0}) rotates by 90 degrees around the +X axis and then - * by 90 degrees around the new +Y axis (which has been moved to the +Z axis). + * applied extrinsically, which means that it rotates around the global axes. + * For example, Rotation3d{90_deg, 0, 0}.RotateBy(Rotation3d{0, 45_deg, 0}) + * rotates by 90 degrees around the +X axis and then by 45 degrees around the + * global +Y axis. (This is equivalent to Rotation3d{90_deg, 45_deg, 0}) * - * @param other The rotation to rotate by. + * @param other The extrinsic rotation to rotate by. * * @return The new rotated Rotation3d. */ diff --git a/wpimath/src/main/native/include/frc/geometry/Transform2d.h b/wpimath/src/main/native/include/frc/geometry/Transform2d.h index 8f6eba2879..6e8ec1a8fd 100644 --- a/wpimath/src/main/native/include/frc/geometry/Transform2d.h +++ b/wpimath/src/main/native/include/frc/geometry/Transform2d.h @@ -94,7 +94,8 @@ class WPILIB_DLLEXPORT Transform2d { } /** - * Composes two transformations. + * Composes two transformations. The second transform is applied relative to + * the orientation of the first. * * @param other The transform to compose with this one. * @return The composition of the two transformations. diff --git a/wpimath/src/main/native/include/frc/geometry/Transform3d.h b/wpimath/src/main/native/include/frc/geometry/Transform3d.h index cf00ecc002..e9a5b2375f 100644 --- a/wpimath/src/main/native/include/frc/geometry/Transform3d.h +++ b/wpimath/src/main/native/include/frc/geometry/Transform3d.h @@ -99,7 +99,8 @@ class WPILIB_DLLEXPORT Transform3d { Transform3d operator/(double scalar) const { return *this * (1.0 / scalar); } /** - * Composes two transformations. + * Composes two transformations. The second transform is applied relative to + * the orientation of the first. * * @param other The transform to compose with this one. * @return The composition of the two transformations.