mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:07:46 +00:00
LibGfx: Add some missing operators to Vector3 Vector4 and Matrix4x4
This commit is contained in:
parent
0c5d61ae88
commit
09f850728a
3 changed files with 53 additions and 0 deletions
|
@ -28,6 +28,22 @@ public:
|
|||
void set_y(T value) { m_y = value; }
|
||||
void set_z(T value) { m_z = value; }
|
||||
|
||||
Vector3& operator+=(const Vector3& other)
|
||||
{
|
||||
m_x += other.m_x;
|
||||
m_y += other.m_y;
|
||||
m_z += other.m_z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vector3& operator-=(const Vector3& other)
|
||||
{
|
||||
m_x -= other.m_x;
|
||||
m_y -= other.m_y;
|
||||
m_z -= other.m_z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Vector3 operator+(const Vector3& other) const
|
||||
{
|
||||
return Vector3(m_x + other.m_x, m_y + other.m_y, m_z + other.m_z);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue