diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation2d.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation2d.java index 6caefa5d7b..5be61561e4 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation2d.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation2d.java @@ -173,6 +173,7 @@ public class Rotation2d implements Interpolatable { * Returns the radian value of the Rotation2d. * * @return The radian value of the Rotation2d. + * @see edu.wpi.first.math.MathUtil#angleModulus(double) to constrain the angle within (-pi, pi] */ @JsonProperty public double getRadians() { @@ -183,6 +184,8 @@ public class Rotation2d implements Interpolatable { * Returns the degree value of the Rotation2d. * * @return The degree value of the Rotation2d. + * @see edu.wpi.first.math.MathUtil#inputModulus(double, double, double) to constrain the angle + * within (-180, 180] */ public double getDegrees() { return Math.toDegrees(m_value); diff --git a/wpimath/src/main/native/include/frc/geometry/Rotation2d.h b/wpimath/src/main/native/include/frc/geometry/Rotation2d.h index e40f3facaf..406ef3c15c 100644 --- a/wpimath/src/main/native/include/frc/geometry/Rotation2d.h +++ b/wpimath/src/main/native/include/frc/geometry/Rotation2d.h @@ -132,6 +132,7 @@ class WPILIB_DLLEXPORT Rotation2d { * Returns the radian value of the rotation. * * @return The radian value of the rotation. + * @see AngleModulus to constrain the angle within (-pi, pi] */ constexpr units::radian_t Radians() const { return m_value; } @@ -139,6 +140,7 @@ class WPILIB_DLLEXPORT Rotation2d { * Returns the degree value of the rotation. * * @return The degree value of the rotation. + * @see InputModulus to constrain the angle within (-180, 180] */ constexpr units::degree_t Degrees() const { return m_value; }