diff --git a/public/xash3d_mathlib.c b/public/xash3d_mathlib.c index fb066c22..2a493412 100644 --- a/public/xash3d_mathlib.c +++ b/public/xash3d_mathlib.c @@ -202,25 +202,6 @@ int NearestPOW( int value, qboolean roundDown ) 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 diff --git a/public/xash3d_mathlib.h b/public/xash3d_mathlib.h index fa7e354a..3c3b124f 100644 --- a/public/xash3d_mathlib.h +++ b/public/xash3d_mathlib.h @@ -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 QuaternionAngle( const vec4_t q, vec3_t angles ); 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