mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:57:44 +00:00
LibGfx: Add unary operator-()
to Vector2/3/4
This commit is contained in:
parent
27ca7bbbd7
commit
53ed93d909
3 changed files with 15 additions and 0 deletions
|
@ -55,6 +55,11 @@ public:
|
|||
return Vector3(m_x - other.m_x, m_y - other.m_y, m_z - other.m_z);
|
||||
}
|
||||
|
||||
constexpr Vector3 operator-() const
|
||||
{
|
||||
return Vector3(-m_x, -m_y, -m_z);
|
||||
}
|
||||
|
||||
constexpr 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