mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpimath] Make C++ geometry classes immutable (#3249)
This commit is contained in:
committed by
GitHub
parent
da96707dca
commit
d3e45c297c
@@ -59,18 +59,6 @@ class Rotation2d {
|
||||
*/
|
||||
Rotation2d operator+(const Rotation2d& other) const;
|
||||
|
||||
/**
|
||||
* Adds a rotation to the current rotation.
|
||||
*
|
||||
* This is similar to the + operator except that it mutates the current
|
||||
* object.
|
||||
*
|
||||
* @param other The rotation to add.
|
||||
*
|
||||
* @return The reference to the new mutated object.
|
||||
*/
|
||||
Rotation2d& operator+=(const Rotation2d& other);
|
||||
|
||||
/**
|
||||
* Subtracts the new rotation from the current rotation and returns the new
|
||||
* rotation.
|
||||
@@ -84,18 +72,6 @@ class Rotation2d {
|
||||
*/
|
||||
Rotation2d operator-(const Rotation2d& other) const;
|
||||
|
||||
/**
|
||||
* Subtracts the new rotation from the current rotation.
|
||||
*
|
||||
* This is similar to the - operator except that it mutates the current
|
||||
* object.
|
||||
*
|
||||
* @param other The rotation to subtract.
|
||||
*
|
||||
* @return The reference to the new mutated object.
|
||||
*/
|
||||
Rotation2d& operator-=(const Rotation2d& other);
|
||||
|
||||
/**
|
||||
* Takes the inverse of the current rotation. This is simply the negative of
|
||||
* the current angular value.
|
||||
|
||||
Reference in New Issue
Block a user