mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 12:43:33 +08:00
add NaN value set for Matrix; add return of URT of a matrix
This commit is contained in:
@@ -412,6 +412,11 @@ public:
|
||||
setAll(1);
|
||||
}
|
||||
|
||||
inline void setNaN()
|
||||
{
|
||||
setAll(NAN);
|
||||
}
|
||||
|
||||
void setIdentity()
|
||||
{
|
||||
setZero();
|
||||
@@ -512,6 +517,13 @@ Matrix<Type, M, N> ones() {
|
||||
return m;
|
||||
}
|
||||
|
||||
template<size_t M, size_t N>
|
||||
Matrix<float, M, N> nans() {
|
||||
Matrix<float, M, N> m;
|
||||
m.setNaN();
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename Type, size_t M, size_t N>
|
||||
Matrix<Type, M, N> operator*(Type scalar, const Matrix<Type, M, N> &other)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user