98 return Vector4(
x * scalar,
y * scalar,
z * scalar,
w * scalar);
120 return Vector4(
x / mag,
y / mag,
z / mag,
w / mag);
Declara la API de EngineMath dentro del subsistema Utilities.
float magnitude() const
Calculates the magnitude (length) of the vector.
Vector4(float x, float y, float z, float w)
Parameterized constructor.
Vector4()
Default constructor.
Vector4 operator*(float scalar) const
Multiplies this vector by a scalar.
Vector4 operator-(const Vector4 &other) const
Subtracts another vector from this vector.
const float * data() const
Returns a pointer to the quaternion's data.
float w
The w-coordinate of the vector.
float z
The z-coordinate of the vector.
float x
The x-coordinate of the vector.
float y
The y-coordinate of the vector.
Vector4 operator+(const Vector4 &other) const
Adds another vector to this vector.
Vector4 normalize() const
Normalizes the vector.
float sqrt(float value)
Computes the square root using the Newton-Raphson method.