1#include <game/mLib/m_angle.hpp>
2#include <game/mLib/m_vec.hpp>
10 nw4r::math::SinIdx(0);
13inline bool isZero(
float val) {
14 return (std::fabs(val) <= FLT_EPSILON);
18 float mag = PSVECMag(*
this);
27 float mag = PSVECMag(*
this);
37 float cos = angle.
cos();
38 float sin = angle.
sin();
41 this->y = cos * y - sin * z;
42 this->z = sin * y + cos * z;
46 float cos = angle.
cos();
47 float sin = angle.
sin();
50 this->x = cos * x + sin * z;
51 this->z = -sin * x + cos * z;
A three-dimensional floating point vector.
static mVec3_c Ex
The unit vector for the X axis.
static mVec3_c Ey
The unit vector for the Y axis.
bool normalizeRS()
Normalizes the vector.
float normalize()
Normalizes the vector.
mVec3_c & operator*=(f32 f)
Augmented scalar product operator.
void rotX(mAng angle)
Rotates the vector on the X axis by the given angle.
void rotY(mAng angle)
Rotates the vector on the Y axis by the given angle.
static mVec3_c Zero
The null vector.
static mVec3_c Ez
The unit vector for the Z axis.
A one-dimensional short angle vector.
float cos() const
Computes the cosine of the angle.
float sin() const
Computes the sine of the angle.