Luna::Float3
3D vector type with f32 components.
struct Luna::Float3
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 third component of the vector.
-
The array of components.
Member functions
-
Constructs one vector with components uninitialized.
-
Float3(const Float3 &)=default
Constructs one vector by coping components from another vector.
-
Float3 & operator=(const Float3 &)=default
Assigns one vector by coping components from another vector.
-
Constructs one vector by coping components from another vector.
-
Float3 & operator=(Float3 &&)=default
Assigns one vector by coping components from another vector.
-
Constructs one vector from one scalar.
-
constexpr Float3(f32 x, f32 y, f32 z)
Constructs one vector from values.
-
bool operator==(const Float3 &v) const
Compares two vectors for equality.
-
bool operator!=(const Float3 &v) const
Compares two vectors for non-equality.
-
Float3 & operator+=(const Float3 &v)
Adds this vector with one vector, and stores the result to this vector.
-
Float3 & operator-=(const Float3 &v)
Subtracts this vector with one vector, and stores the result to this vector.
-
Float3 & operator*=(const Float3 &v)
Multiplies this vector with one vector, and stores the result to this vector.
-
Float3 & operator/=(const Float3 &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.
-
Gets the first two components of this vector.