mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 09:43:34 +08:00
matrix: allow casting float<->double
This commit is contained in:
committed by
Mathieu Bresciani
parent
5d7b734bc9
commit
9b172d36a2
@@ -55,6 +55,16 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename S>
|
||||||
|
Matrix(const Matrix<S, M, N> &aa)
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < M; i++) {
|
||||||
|
for (size_t j = 0; j < N; j++) {
|
||||||
|
_data[i][j] = static_cast<Type>(aa(i, j));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template<size_t P, size_t Q>
|
template<size_t P, size_t Q>
|
||||||
Matrix(const Slice<Type, M, N, P, Q> &in_slice)
|
Matrix(const Slice<Type, M, N, P, Q> &in_slice)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user