mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 09:43:34 +08:00
Added more warnings, and fixed issues.
This commit is contained in:
+1
-15
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
Type norm() const {
|
||||
const Vector &a(*this);
|
||||
return sqrt(a.dot(a));
|
||||
return Type(sqrt(a.dot(a)));
|
||||
}
|
||||
|
||||
inline void normalize() {
|
||||
@@ -81,20 +81,6 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
bool operator==(const Vector<Type, M> &other) const
|
||||
{
|
||||
Vector<Type, M> res;
|
||||
const Vector<Type, M> &self = *this;
|
||||
|
||||
for (size_t i = 0; i < M; i++) {
|
||||
if (self(i) != other(i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Vector<Type, M> operator-(const Vector<Type, M> &other) const
|
||||
{
|
||||
Vector<Type, M> res;
|
||||
|
||||
Reference in New Issue
Block a user