mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 14:17:35 +08:00
Formatting.
This commit is contained in:
+8
-8
@@ -426,16 +426,16 @@ Matrix<Type, M, N> operator*(Type scalar, const Matrix<Type, M, N> &other)
|
||||
#if defined(SUPPORT_STDIOSTREAM)
|
||||
template<typename Type, size_t M, size_t N>
|
||||
std::ostream& operator<<(std::ostream& os,
|
||||
const matrix::Matrix<Type, M, N>& matrix)
|
||||
const matrix::Matrix<Type, M, N>& matrix)
|
||||
{
|
||||
for (size_t i = 0; i < M; ++i) {
|
||||
os << "[";
|
||||
for (size_t j = 0; j < N; ++j) {
|
||||
os << std::setw(10) << static_cast<double>(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<double>(matrix(i, j));
|
||||
os << "\t";
|
||||
}
|
||||
os << "]" << std::endl;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
#endif // defined(SUPPORT_STDIOSTREAM)
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user