Luna::Float2
2D vector type with f32 components.
struct Luna::Float2
This vector type is 16-bytes aligned and will use SIMD to accelerate vector calculations when possible.
Member objects
-
The fist component of the vector.
-
The second component of the vector.
-
The array of components.
Member functions
-
Constructs one vector with components uninitialized.
-
Float2(const Float2 &)=default
Constructs one vector by coping components from another vector.
-
Float2 & operator=(const Float2 &)=default
Assigns one vector by coping components from another vector.
-
Constructs one vector by coping components from another vector.
-
Float2 & operator=(Float2 &&)=default
Assigns one vector by coping components from another vector.
-
Constructs one vector from one scalar.
-
constexpr Float2(f32 x, f32 y)
Constructs one vector from values.
-
bool operator==(const Float2 &v) const
Compares two vectors for equality.
-
bool operator!=(const Float2 &v) const
Compares two vectors for non-equality.
-
Float2 & operator+=(const Float2 &v)
Adds this vector with one vector, and stores the result to this vector.
-
Float2 & operator-=(const Float2 &v)
Subtracts this vector with one vector, and stores the result to this vector.
-
Float2 & operator*=(const Float2 &v)
Multiplies this vector with one vector, and stores the result to this vector.
-
Float2 & operator/=(const Float2 &v)
Divides this vector with one vector, and stores the result to this vector.
-
Adds this vector with one scalar, and stores the result to this vector.
-
Subtracts this vector with one scalar, and stores the result to this vector.
-
Multiplies this vector with one scalar, and stores the result to this vector.
-
Divides this vector with one scalar, and stores the result to this vector.
-
Gets the vector as-is.
-
Gets a negation of this vector.