Add equality comparator to geometry classes (#1882)

This commit is contained in:
Prateek Machiraju
2019-09-08 14:20:26 -04:00
committed by Peter Johnson
parent 62f07c182c
commit 86b666bba9
26 changed files with 341 additions and 10 deletions

View File

@@ -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) <<