mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-11 15:47:55 +00:00
public: mathlib: remove unused RemapVal, ApproachVal
This commit is contained in:
parent
21b47dff32
commit
d962255ebe
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user