[wpimath] Replace constexpr coeff() and coeffRef() with operator() (#7391)

This commit is contained in:
Tyler Veness
2024-11-16 07:44:20 -08:00
committed by GitHub
parent ca51197486
commit aa7dd258c4
74 changed files with 1953 additions and 1329 deletions

View File

@@ -60,8 +60,7 @@ class WPILIB_DLLEXPORT Translation2d {
* @param vector The translation vector to represent.
*/
constexpr explicit Translation2d(const Eigen::Vector2d& vector)
: m_x{units::meter_t{vector.coeff(0)}},
m_y{units::meter_t{vector.coeff(1)}} {}
: m_x{units::meter_t{vector(0)}}, m_y{units::meter_t{vector(1)}} {}
/**
* Calculates the distance between two translations in 2D space.