mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpimath] Minor fixes to Rotation2d docs (NFC) (#4055)
Fixed incorrect examples on .plus(), and a missing word. Make example code snippets closer to actual use.
This commit is contained in:
@@ -15,7 +15,7 @@ class json;
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* A rotation in a 2d coordinate frame represented a point on the unit circle
|
||||
* A rotation in a 2d coordinate frame represented by a point on the unit circle
|
||||
* (cosine and sine).
|
||||
*/
|
||||
class WPILIB_DLLEXPORT Rotation2d {
|
||||
@@ -52,8 +52,8 @@ class WPILIB_DLLEXPORT Rotation2d {
|
||||
* Adds two rotations together, with the result being bounded between -pi and
|
||||
* pi.
|
||||
*
|
||||
* For example, Rotation2d.FromDegrees(30) + Rotation2d.FromDegrees(60) =
|
||||
* Rotation2d{-pi/2}
|
||||
* For example, <code>Rotation2d{30_deg} + Rotation2d{60_deg}</code> equals
|
||||
* <code>Rotation2d{units::radian_t{wpi::numbers::pi/2.0}}</code>
|
||||
*
|
||||
* @param other The rotation to add.
|
||||
*
|
||||
@@ -65,8 +65,8 @@ class WPILIB_DLLEXPORT Rotation2d {
|
||||
* Subtracts the new rotation from the current rotation and returns the new
|
||||
* rotation.
|
||||
*
|
||||
* For example, Rotation2d.FromDegrees(10) - Rotation2d.FromDegrees(100) =
|
||||
* Rotation2d{-pi/2}
|
||||
* For example, <code>Rotation2d{10_deg} - Rotation2d{100_deg}</code> equals
|
||||
* <code>Rotation2d{units::radian_t{-wpi::numbers::pi/2.0}}</code>
|
||||
*
|
||||
* @param other The rotation to subtract.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user