mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 22:58:10 +08:00
Vector3f: Add operator+/- for scalars
This commit is contained in:
committed by
Julian Kent
parent
a504b6e881
commit
158409abce
@@ -75,11 +75,21 @@ public:
|
|||||||
return Matrix31::operator+(other);
|
return Matrix31::operator+(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline Vector3 operator+(Type scalar) const
|
||||||
|
{
|
||||||
|
return Matrix31::operator+(scalar);
|
||||||
|
}
|
||||||
|
|
||||||
inline Vector3 operator-(Vector3 other) const
|
inline Vector3 operator-(Vector3 other) const
|
||||||
{
|
{
|
||||||
return Matrix31::operator-(other);
|
return Matrix31::operator-(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline Vector3 operator-(Type scalar) const
|
||||||
|
{
|
||||||
|
return Matrix31::operator-(scalar);
|
||||||
|
}
|
||||||
|
|
||||||
inline Vector3 operator-() const
|
inline Vector3 operator-() const
|
||||||
{
|
{
|
||||||
return Matrix31::operator-();
|
return Matrix31::operator-();
|
||||||
|
|||||||
Reference in New Issue
Block a user