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