Skip to content

Commit

Permalink
[wpimath] add Measure<Angle> getter for Rotation2d
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty committed Apr 9, 2024
1 parent 02c78bc commit 0a3ff04
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ public Rotation2d rotateBy(Rotation2d other) {
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.
*
Expand Down

0 comments on commit 0a3ff04

Please sign in to comment.