diff --git a/wpimath/src/main/java/edu/wpi/first/wpilibj/geometry/Rotation2d.java b/wpimath/src/main/java/edu/wpi/first/wpilibj/geometry/Rotation2d.java index c408de859c..c4c83a811c 100644 --- a/wpimath/src/main/java/edu/wpi/first/wpilibj/geometry/Rotation2d.java +++ b/wpimath/src/main/java/edu/wpi/first/wpilibj/geometry/Rotation2d.java @@ -112,8 +112,13 @@ public class Rotation2d { /** * Adds the new rotation to the current rotation using a rotation matrix. * - *

The matrix multiplication is as follows: [cos_new] [other.cos, -other.sin][cos] [sin_new] = - * [other.sin, other.cos][sin] value_new = atan2(cos_new, sin_new) + *

The matrix multiplication is as follows: + * + *

+   * [cos_new]   [other.cos, -other.sin][cos]
+   * [sin_new] = [other.sin,  other.cos][sin]
+   * value_new = atan2(sin_new, cos_new)
+   * 
* * @param other The rotation to rotate by. * @return The new rotated Rotation2d. diff --git a/wpimath/src/main/native/include/frc/geometry/Rotation2d.h b/wpimath/src/main/native/include/frc/geometry/Rotation2d.h index 4a69124b21..1748e60d9a 100644 --- a/wpimath/src/main/native/include/frc/geometry/Rotation2d.h +++ b/wpimath/src/main/native/include/frc/geometry/Rotation2d.h @@ -131,10 +131,11 @@ class Rotation2d { /** * Adds the new rotation to the current rotation using a rotation matrix. * + *
    * [cos_new]   [other.cos, -other.sin][cos]
    * [sin_new] = [other.sin,  other.cos][sin]
-   *
-   * value_new = std::atan2(cos_new, sin_new)
+   * value_new = std::atan2(sin_new, cos_new)
+   * 
* * @param other The rotation to rotate by. *