diff --git a/matrix/Matrix.hpp b/matrix/Matrix.hpp index f8e35697b0..9461fb2619 100644 --- a/matrix/Matrix.hpp +++ b/matrix/Matrix.hpp @@ -426,16 +426,16 @@ Matrix operator*(Type scalar, const Matrix &other) #if defined(SUPPORT_STDIOSTREAM) template std::ostream& operator<<(std::ostream& os, - const matrix::Matrix& matrix) + const matrix::Matrix& matrix) { - for (size_t i = 0; i < M; ++i) { - os << "["; - for (size_t j = 0; j < N; ++j) { - os << std::setw(10) << static_cast(matrix(i, j)); - os << "\t"; - } - os << "]" << std::endl; + for (size_t i = 0; i < M; ++i) { + os << "["; + for (size_t j = 0; j < N; ++j) { + os << std::setw(10) << static_cast(matrix(i, j)); + os << "\t"; } + os << "]" << std::endl; + } return os; } #endif // defined(SUPPORT_STDIOSTREAM) diff --git a/test/attitude.cpp b/test/attitude.cpp index 9ae0f27938..1d008d2b28 100644 --- a/test/attitude.cpp +++ b/test/attitude.cpp @@ -137,7 +137,7 @@ int main() float scalar = 0.5; Quatf q_scalar_mul(1.0f, 2.0f, 3.0f, 4.0f); Quatf q_scalar_mul_check(1.0f * scalar, 2.0f * scalar, - 3.0f * scalar, 4.0f * scalar); + 3.0f * scalar, 4.0f * scalar); Quatf q_scalar_mul_res = scalar * q_scalar_mul; assert(q_scalar_mul_check == q_scalar_mul_res); Quatf q_scalar_mul_res2 = q_scalar_mul * scalar;