public: mathlib: remove unused RemapVal, ApproachVal
This commit is contained in:
parent
21b47dff32
commit
d962255ebe
2 changed files with 0 additions and 21 deletions
|
@ -202,25 +202,6 @@ int NearestPOW( int value, qboolean roundDown )
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remap a value in the range [A,B] to [C,D].
|
|
||||||
float RemapVal( float val, float A, float B, float C, float D )
|
|
||||||
{
|
|
||||||
return C + (D - C) * (val - A) / (B - A);
|
|
||||||
}
|
|
||||||
|
|
||||||
float ApproachVal( float target, float value, float speed )
|
|
||||||
{
|
|
||||||
float delta = target - value;
|
|
||||||
|
|
||||||
if( delta > speed )
|
|
||||||
value += speed;
|
|
||||||
else if( delta < -speed )
|
|
||||||
value -= speed;
|
|
||||||
else value = target;
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=================
|
=================
|
||||||
rsqrt
|
rsqrt
|
||||||
|
|
|
@ -201,8 +201,6 @@ void ExpandBounds( vec3_t mins, vec3_t maxs, float offset );
|
||||||
void AngleQuaternion( const vec3_t angles, vec4_t q, qboolean studio );
|
void AngleQuaternion( const vec3_t angles, vec4_t q, qboolean studio );
|
||||||
void QuaternionAngle( const vec4_t q, vec3_t angles );
|
void QuaternionAngle( const vec4_t q, vec3_t angles );
|
||||||
void QuaternionSlerp( const vec4_t p, const vec4_t q, float t, vec4_t qt );
|
void QuaternionSlerp( const vec4_t p, const vec4_t q, float t, vec4_t qt );
|
||||||
float RemapVal( float val, float A, float B, float C, float D );
|
|
||||||
float ApproachVal( float target, float value, float speed );
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// matrixlib.c
|
// matrixlib.c
|
||||||
|
|
Loading…
Add table
Reference in a new issue