[wpimath] Rotation2d: add Measure<Angle> getter (Java) (#6492)

This commit is contained in:
Isaac Turner
2024-04-22 11:23:36 +08:00
committed by GitHub
parent f26adc556d
commit d14dfed828

View File

@@ -187,6 +187,15 @@ public class Rotation2d
m_cos * other.m_cos - m_sin * other.m_sin, m_cos * other.m_sin + m_sin * other.m_cos);
}
/**
* Returns the measure of the Rotation2d.
*
* @return The measure of the Rotation2d.
*/
public Measure<Angle> getMeasure() {
return Radians.of(getRadians());
}
/**
* Returns the radian value of the Rotation2d.
*