mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpimath] Rotation2d: add Measure<Angle> getter (Java) (#6492)
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user