mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-02 22:40:27 +08:00
Vector3f: Add operator+/- for scalars
This commit is contained in:
1 parent
a504b6e881
commit
158409abce
1 file changed
+10
@@ -75,11 +75,21 @@ public:
|
||||
return Matrix31::operator+(other);
|
||||
}
|
||||
|
||||
inline Vector3 operator+(Type scalar) const
|
||||
{
|
||||
return Matrix31::operator+(scalar);
|
||||
}
|
||||
|
||||
inline Vector3 operator-(Vector3 other) const
|
||||
{
|
||||
return Matrix31::operator-(other);
|
||||
}
|
||||
|
||||
inline Vector3 operator-(Type scalar) const
|
||||
{
|
||||
return Matrix31::operator-(scalar);
|
||||
}
|
||||
|
||||
inline Vector3 operator-() const
|
||||
{
|
||||
return Matrix31::operator-();
|
||||
|
||||
Reference in new issue
Block a user