81 x += other.
x;
y += other.
y;
z += other.
z;
102 return Vector3(
x * scalar,
y * scalar,
z * scalar);
140 return a.
x * b.
x + a.
y * b.
y + a.
z * b.
z;
145 a.
y * b.
z - a.
z * b.
y,
146 a.
z * b.
x - a.
x * b.
z,
147 a.
x * b.
y - a.
y * b.
x
154 const float*
data()
const {
return &
x; }
Declara la API de EngineMath dentro del subsistema Utilities.
float x
The x-coordinate of the vector.
Vector3 & operator+=(const Vector3 &other)
Vector3(float x, float y, float z)
Parameterized constructor.
Vector3 operator*(float scalar) const
Multiplies this vector by a scalar.
float magnitude() const
Calculates the magnitude (length) of the vector.
float z
The z-coordinate of the vector.
Vector3 operator+(const Vector3 &other) const
Adds another vector to this vector.
const float * data() const
Vector3 operator-(const Vector3 &other) const
Subtracts another vector from this vector.
float dot(const Vector3 &a, const Vector3 &b)
Vector3 normalize() const
Normalizes the vector.
Vector3()
Default constructor.
float y
The y-coordinate of the vector.
Vector3 cross(const Vector3 &a, const Vector3 &b)
float sqrt(float value)
Computes the square root using the Newton-Raphson method.