14 #ifndef G3D_VECTORMATH_H
15 #define G3D_VECTORMATH_H
73 return Vector2(::fabsf(v.
x), ::fabsf(v.
y));
77 return Vector3(::fabsf(v.
x), ::fabsf(v.
y), ::fabsf(v.
z));
81 return Vector4(::fabsf(v.
x), ::fabsf(v.
y), ::fabsf(v.
z), ::fabsf(v.
w));
85 return (v.
x != 0) && (v.
y != 0);
89 return (v.
x != 0) && (v.
y != 0) && (v.
z != 0);
93 return (v.
x != 0) && (v.
y != 0) && (v.
z != 0) && (v.
w != 0);
97 return (v.
x != 0) || (v.
y != 0);
101 return (v.
x != 0) || (v.
y != 0) || (v.
z != 0);
105 return (v.
x != 0) || (v.
y != 0) || (v.
z != 0) || (v.
w != 0);
109 return v.
clamp(a, b);
113 return v.
clamp(a, b);
117 return v.
clamp(a, b);
121 return v1.
lerp(v2, f);
125 return v1.
lerp(v2, f);
129 return v1.
lerp(v2, f);
133 return v1.
lerp(v2, f);
137 return v1.
lerp(v2, f);
141 return v1.
lerp(v2, f);
230 return Color3(::logf(c.
r), ::logf(c.
g), ::logf(c.
b));
float length() const
Definition: Vector4.h:692
Color4 lerp(const Color4 &other, float a) const
Definition: Color4.h:160
float x
Definition: Vector3.h:62
Quat log(const Quat &q)
Definition: Quat.h:733
float w
Definition: Vector4.h:74
double abs(double fValue)
Definition: g3dmath.h:617
Vector3 __fastcall max(const Vector3 &v) const
Definition: Vector3.h:794
Vector2 clamp(const Vector2 &low, const Vector2 &high) const
Definition: Vector2.h:137
Vector2 min(const Vector2 &v) const
Definition: Vector2.h:452
float length() const
Definition: Vector2.h:419
Vector3 clamp(const Vector3 &low, const Vector3 &high) const
Definition: Vector3.h:329
bool any(float x)
Definition: g3dmath.h:424
float mul(float a, float b)
Definition: g3dmath.h:453
Vector2 lerp(const Vector2 &v, float alpha) const
Definition: Vector2.h:133
double clamp(double val, double low, double hi)
Definition: g3dmath.h:571
float __fastcall dot(const Vector3 &rkVector) const
Definition: Vector3.h:771
Vector3 __fastcall min(const Vector3 &v) const
Definition: Vector3.h:789
float y
Definition: Vector3.h:62
bool all(float x)
Definition: g3dmath.h:431
float x
Definition: Vector4.h:74
T max(const T &x, const T &y)
Definition: g3dmath.h:320
float y
Definition: Vector2.h:50
Color3 lerp(const Color3 &other, float a) const
Definition: Color3.h:220
float normalize(float v)
Definition: g3dmath.h:438
double determinant(const Matrix3 &m)
Definition: vectorMath.h:148
Vector3 lerp(const Vector3 &v, float alpha) const
Definition: Vector3.h:357
T min(const T &x, const T &y)
Definition: g3dmath.h:305
float g
Definition: Color3.h:139
Color4 min(const Color4 &other) const
Definition: Color4.h:151
Vector4 max(const Vector4 &v) const
Definition: Vector4.h:669
Vector4 clamp(const Vector4 &low, const Vector4 &high) const
Definition: Vector4.h:161
float magnitude() const
Definition: Vector3.h:746
float x
Definition: Vector2.h:49
float r
Definition: Color3.h:139
float dot(const Vector4 &rkVector) const
Definition: Vector4.h:659
float length(float v)
Definition: vectorMath.h:208
float z
Definition: Vector4.h:74
Vector3 __fastcall cross(const Vector3 &rkVector) const
Definition: Vector3.h:776
Vector4 min(const Vector4 &v) const
Definition: Vector4.h:664
float z
Definition: Vector3.h:62
Color1 lerp(const Color1 &other, float a) const
Definition: Color1.h:148
Vector3 cross(const Vector3 &v1, const Vector3 &v2)
Definition: vectorMath.h:144
float dot(float a, float b)
Definition: g3dmath.h:445
Color3 max(const Color3 &other) const
Definition: Color3.h:202
Color4 max(const Color4 &other) const
Definition: Color4.h:147
float y
Definition: Vector4.h:74
double lerp(double a, double b, double f)
Definition: g3dmath.h:189
float determinant() const
Definition: Matrix4.cpp:424
Vector2 max(const Vector2 &v) const
Definition: Vector2.h:458
double sign(double fValue)
Definition: g3dmath.h:669
Color3 min(const Color3 &other) const
Definition: Color3.h:206
float determinant() const
Definition: Matrix3.cpp:453
float dot(const Vector2 &s) const
Definition: Vector2.h:446
Vector4 lerp(const Vector4 &v, float alpha) const
Definition: Vector4.h:643
float b
Definition: Color3.h:139