mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 17:33:35 +08:00
Set Matrix's col amd row to single value (#113)
This commit is contained in:
+2
-2
@@ -119,9 +119,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Vector<Type, P<Q?P:Q> diag()
|
||||
Vector<Type, P<Q?P:Q> diag() const
|
||||
{
|
||||
Slice<Type, P, Q, M, N>& self = *this;
|
||||
const Slice<Type, P, Q, M, N>& self = *this;
|
||||
Vector<Type,P<Q?P:Q> res;
|
||||
for (size_t j = 0; j < (P<Q?P:Q); j++) {
|
||||
res(j) = self(j,j);
|
||||
|
||||
Reference in New Issue
Block a user