mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Add equality comparator to geometry classes (#1882)
This commit is contained in:
committed by
Peter Johnson
parent
62f07c182c
commit
86b666bba9
@@ -20,8 +20,7 @@ std::array<SwerveModuleState, NumModules>
|
||||
SwerveDriveKinematics<NumModules>::ToSwerveModuleStates(
|
||||
const ChassisSpeeds& chassisSpeeds, const Translation2d& centerOfRotation) {
|
||||
// We have a new center of rotation. We need to compute the matrix again.
|
||||
if (centerOfRotation.X() != m_previousCoR.X() ||
|
||||
centerOfRotation.Y() != m_previousCoR.Y()) {
|
||||
if (centerOfRotation != m_previousCoR) {
|
||||
for (size_t i = 0; i < NumModules; i++) {
|
||||
// clang-format off
|
||||
m_inverseKinematics.template block<2, 3>(i * 2, 0) <<
|
||||
|
||||
Reference in New Issue
Block a user