File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
wpimath/src/main/native/include/wpi/math/kinematics Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace wpi::math {
1414/* *
1515 * Represents the state of one swerve module.
1616 */
17- struct [[nodiscard]] WPILIB_DLLEXPORT SwerveModuleState {
17+ struct WPILIB_DLLEXPORT SwerveModuleState {
1818 /* *
1919 * Speed of the wheel of the module.
2020 */
@@ -45,6 +45,7 @@ struct [[nodiscard]] WPILIB_DLLEXPORT SwerveModuleState {
4545 * @param currentAngle The current module angle.
4646 * @return The optimized module state.
4747 */
48+ [[nodiscard]]
4849 constexpr SwerveModuleState Optimize (const Rotation2d& currentAngle) {
4950 auto delta = angle - currentAngle;
5051 if (wpi::units::math::abs (delta.Degrees ()) > 90_deg) {
@@ -62,6 +63,7 @@ struct [[nodiscard]] WPILIB_DLLEXPORT SwerveModuleState {
6263 * @param currentAngle The current module angle.
6364 * @return The scaled module state.
6465 */
66+ [[nodiscard]]
6567 constexpr SwerveModuleState CosineScale (const Rotation2d& currentAngle) {
6668 return {speed * (angle - currentAngle).Cos (), angle};
6769 }
You can’t perform that action at this time.
0 commit comments