|
| constexpr | Vector2 () noexcept=default |
| | Constructs a zero vector (x = y = 0).
|
| |
| constexpr | Vector2 (float _x, float _y) noexcept |
| | Constructs a vector from explicit components.
|
| |
| constexpr Vector2 & | operator+= (const Vector2 &rhs) noexcept |
| | Adds another vector component-wise.
|
| |
| constexpr Vector2 & | operator-= (const Vector2 &rhs) noexcept |
| | Subtracts another vector component-wise.
|
| |
| constexpr Vector2 & | operator*= (const Vector2 &rhs) noexcept |
| | Multiplies by another vector component-wise.
|
| |
| constexpr Vector2 & | operator/= (const Vector2 &rhs) noexcept |
| | Divides by another vector component-wise.
|
| |
| constexpr Vector2 & | operator+= (float rhs) noexcept |
| | Adds a scalar to both components.
|
| |
| constexpr Vector2 & | operator-= (float rhs) noexcept |
| | Subtracts a scalar from both components.
|
| |
| constexpr Vector2 & | operator*= (float rhs) noexcept |
| | Multiplies both components by a scalar.
|
| |
| constexpr Vector2 & | operator/= (float rhs) noexcept |
| | Divides both components by a scalar.
|
| |
Two-component floating-point vector.
Provides component-wise arithmetic against both other vectors and scalars. All operations are constexpr and noexcept so the type can be used in compile-time contexts.