diff --git a/gtsam/geometry/Rot2.cpp b/gtsam/geometry/Rot2.cpp index 0133c9440..6ae559a62 100644 --- a/gtsam/geometry/Rot2.cpp +++ b/gtsam/geometry/Rot2.cpp @@ -64,8 +64,10 @@ Rot2& Rot2::normalize() { } /* ************************************************************************* */ -Matrix Rot2::matrix() const { - return (Matrix(2, 2) << c_, -s_, s_, c_).finished(); +Matrix2 Rot2::matrix() const { + Matrix2 rvalue; + rvalue << c_, -s_, s_, c_; + return rvalue; } /* ************************************************************************* */