24 return Vec2(
x + other.
x,
y + other.
y);
32 return Vec2(
x - other.
x,
y - other.
y);
40 return Vec2(
x * scalar,
y * scalar);
Represents a 2-dimensional vector with float components.
Definition Vec2.h:8
Vec2 operator-(const Vec2 &other) const
Definition Vec2.h:30
float y
The x and y components of the vector.
Definition Vec2.h:9
Vec2(float x, float y)
Definition Vec2.h:17
Vec2()
Default constructor. Initializes all components to zero.
Definition Vec2.h:12
Vec2 operator*(float scalar) const
Definition Vec2.h:38
Vec2 operator+(const Vec2 &other) const
Definition Vec2.h:22
float x
Definition Vec2.h:9