Represents the accelerations of one swerve module.
More...
#include <wpi/math/kinematics/SwerveModuleAcceleration.hpp>
|
| units::meters_per_second_squared_t | acceleration = 0_mps_sq |
| | Acceleration of the wheel of the module.
|
| Rotation2d | angle |
| | Angle of the acceleration vector.
|
Represents the accelerations of one swerve module.
◆ operator*()
Multiplies the SwerveModuleAccelerations by a scalar and returns the new SwerveModuleAccelerations.
- Parameters
-
| scalar | The scalar to multiply by. |
- Returns
- The scaled SwerveModuleAccelerations.
◆ operator+()
Adds two SwerveModuleAccelerations and returns the sum.
Note: This performs vector addition of the accelerations.
- Parameters
-
| other | The SwerveModuleAccelerations to add. |
- Returns
- The sum of the SwerveModuleAccelerations.
◆ operator-() [1/2]
Returns the inverse of the current SwerveModuleAccelerations.
This is equivalent to rotating the acceleration by pi (or 180 degrees).
- Returns
- The inverse of the current SwerveModuleAccelerations.
◆ operator-() [2/2]
Subtracts the other SwerveModuleAccelerations from the current SwerveModuleAccelerations and returns the difference.
- Parameters
-
| other | The SwerveModuleAccelerations to subtract. |
- Returns
- The difference between the two SwerveModuleAccelerations.
◆ operator/()
Divides the SwerveModuleAccelerations by a scalar and returns the new SwerveModuleAccelerations.
- Parameters
-
| scalar | The scalar to divide by. |
- Returns
- The scaled SwerveModuleAccelerations.
◆ operator==()
Checks equality between this SwerveModuleAccelerations and another object.
- Parameters
-
- Returns
- Whether the two objects are equal.
◆ acceleration
| units::meters_per_second_squared_t wpi::math::SwerveModuleAcceleration::acceleration = 0_mps_sq |
Acceleration of the wheel of the module.
◆ angle
| Rotation2d wpi::math::SwerveModuleAcceleration::angle |
Angle of the acceleration vector.
The documentation for this struct was generated from the following file: