29 #include "../precompiled.h"
65 }
else if ( l >= 1.0
f ) {
68 (*this) = v1 + l * ( v2 -
v1 );
87 if ( (
y == 0.0
f ) && (
x == 0.0
f ) ) {
108 if ( (
x == 0.0
f ) && (
y == 0.0
f ) ) {
116 pitch =
RAD2DEG( atan2(
z, forward ) );
117 if ( pitch < 0.0
f ) {
135 if ( (
x == 0.0
f ) && (
y == 0.0
f ) ) {
149 pitch =
RAD2DEG( atan2(
z, forward ) );
150 if ( pitch < 0.0
f ) {
168 if ( (
x == 0.0
f ) && (
y == 0.0
f ) ) {
182 pitch =
RAD2DEG( atan2(
z, forward ) );
183 if ( pitch < 0.0
f ) {
211 mat[2] =
Cross( mat[1] );
235 }
else if ( l >= 1.0
f ) {
238 (*this) = v1 + l * ( v2 -
v1 );
250 #define LERP_DELTA 1e-6
253 float omega, cosom, sinom, scale0, scale1;
258 }
else if ( t >= 1.0
f ) {
265 omega = acos( cosom );
266 sinom = sin( omega );
267 scale0 = sin( ( 1.0
f - t ) * omega ) / sinom;
268 scale1 = sin( t * omega ) / sinom;
274 (*this) = ( v1 * scale0 + v2 * scale1 );
285 float rsqr = radius * radius;
287 if ( len < rsqr * 0.5
f ) {
288 z = sqrt( rsqr - len );
290 z = rsqr / ( 2.0f * sqrt( len ) );
321 }
else if ( l >= 1.0
f ) {
324 (*this) = v1 + l * ( v2 -
v1 );
352 }
else if ( l >= 1.0
f ) {
355 x = v1.
x + l * ( v2.
x - v1.
x );
356 y = v1.
y + l * ( v2.
y - v1.
y );
357 z = v1.
z + l * ( v2.
z - v1.
z );
358 s = v1.
s + l * ( v2.
s - v1.
s );
359 t = v1.
t + l * ( v2.
t - v1.
t );
static const float INFINITY
idMat3 ToMat3(void) const
idVec4 vec4_origin(0.0f, 0.0f, 0.0f, 0.0f)
const float * ToFloatPtr(void) const
int GetDimension(void) const
idVec6 vec6_origin(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)
const char * ToString(int precision=2) const
static const char * FloatArrayToString(const float *array, const int length, const int precision)
static float Sqrt(float x)
void Lerp(const idVec2 &v1, const idVec2 &v2, const float l)
idVec3 Cross(const idVec3 &a) const
const char * ToString(int precision=2) const
const float * ToFloatPtr(void) const
GLfloat GLfloat GLfloat v2
idAngles ToAngles(void) const
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
static float temp[VECX_MAX_TEMP+4]
const char * ToString(int precision=2) const
const float * ToFloatPtr(void) const
const char * ToString(int precision=2) const
static float InvSqrt(float x)
float ToPitch(void) const
const float * ToFloatPtr(void) const
const char * ToString(int precision=2) const
int GetDimension(void) const
idVec5 vec5_origin(0.0f, 0.0f, 0.0f, 0.0f, 0.0f)
const float * ToFloatPtr(void) const
idVec2 vec2_origin(0.0f, 0.0f)
void ProjectSelfOntoSphere(const float radius)
void Lerp(const idVec4 &v1, const idVec4 &v2, const float l)
const float * ToFloatPtr(void) const
idVec6 vec6_infinity(idMath::INFINITY, idMath::INFINITY, idMath::INFINITY, idMath::INFINITY, idMath::INFINITY, idMath::INFINITY)
void Lerp(const idVec5 &v1, const idVec5 &v2, const float l)
void Lerp(const idVec3 &v1, const idVec3 &v2, const float l)
int GetDimension(void) const
void SLerp(const idVec3 &v1, const idVec3 &v2, const float l)
int GetDimension(void) const
int GetDimension(void) const
const char * ToString(int precision=2) const
idPolar3 ToPolar(void) const
int GetDimension(void) const