From cba939cf43165c7f5b4136352f0efa29c0382795 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sat, 22 Nov 2025 20:20:44 -0800 Subject: [PATCH] [wpimath] Remove redundant parentheses in TransformBy() (#8419) --- wpimath/src/main/native/include/wpi/math/geometry/Pose2d.hpp | 2 +- wpimath/src/main/native/include/wpi/math/geometry/Pose3d.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wpimath/src/main/native/include/wpi/math/geometry/Pose2d.hpp b/wpimath/src/main/native/include/wpi/math/geometry/Pose2d.hpp index a52bd83d8b..3e2c3b8661 100644 --- a/wpimath/src/main/native/include/wpi/math/geometry/Pose2d.hpp +++ b/wpimath/src/main/native/include/wpi/math/geometry/Pose2d.hpp @@ -286,7 +286,7 @@ constexpr Transform2d Pose2d::operator-(const Pose2d& other) const { constexpr Pose2d Pose2d::TransformBy( const wpi::math::Transform2d& other) const { - return {m_translation + (other.Translation().RotateBy(m_rotation)), + return {m_translation + other.Translation().RotateBy(m_rotation), other.Rotation() + m_rotation}; } diff --git a/wpimath/src/main/native/include/wpi/math/geometry/Pose3d.hpp b/wpimath/src/main/native/include/wpi/math/geometry/Pose3d.hpp index 9fbd29fda4..e1a303db83 100644 --- a/wpimath/src/main/native/include/wpi/math/geometry/Pose3d.hpp +++ b/wpimath/src/main/native/include/wpi/math/geometry/Pose3d.hpp @@ -314,7 +314,7 @@ constexpr Transform3d Pose3d::operator-(const Pose3d& other) const { } constexpr Pose3d Pose3d::TransformBy(const Transform3d& other) const { - return {m_translation + (other.Translation().RotateBy(m_rotation)), + return {m_translation + other.Translation().RotateBy(m_rotation), other.Rotation() + m_rotation}; }