mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-29 01:14:07 +08:00
matrix: allow casting float<->double
This commit is contained in:
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>
|
||||
Matrix(const Slice<Type, M, N, P, Q> &in_slice)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user