Browse Source

public: mathlib: remove unused RemapVal, ApproachVal

pull/2/head
Alibek Omarov 1 year ago
parent
commit
d962255ebe
  1. 19
      public/xash3d_mathlib.c
  2. 2
      public/xash3d_mathlib.h

19
public/xash3d_mathlib.c

@ -202,25 +202,6 @@ int NearestPOW( int value, qboolean roundDown ) @@ -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

2
public/xash3d_mathlib.h

@ -201,8 +201,6 @@ void ExpandBounds( vec3_t mins, vec3_t maxs, float offset ); @@ -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…
Cancel
Save