1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00

Fix even more build errors caused by c33f715: mathlib (#107)

This fixes the mathlib build, at least for me.

I didn't bother to fix code in e.g. raytrace or vgui_controls, so things
are almost certainly still broken in there.
This commit is contained in:
sigsegv
2022-10-15 06:52:44 -07:00
committed by GitHub
parent 96df7cdd53
commit d37768fc19
4 changed files with 10 additions and 10 deletions

View File

@ -1777,7 +1777,7 @@ void QuaternionScale( const Quaternion &p, float t, Quaternion &q )
// FIXME: nick, this isn't overly sensitive to accuracy, and it may be faster to
// use the cos part (w) of the quaternion (sin(omega)*N,cos(omega)) to figure the new scale.
float sinom = sqrt( DotProduct( &p.x, &p.x ) );
sinom = min( sinom, 1.f );
sinom = V_min( sinom, 1.f );
float sinsom = sin( asin( sinom ) * t );
@ -4057,10 +4057,10 @@ void CalcTriangleTangentSpace( const Vector &p0, const Vector &p1, const Vector
//-----------------------------------------------------------------------------
void RGBtoHSV( const Vector &rgb, Vector &hsv )
{
float flMax = max( rgb.x, rgb.y );
flMax = max( flMax, rgb.z );
float flMin = min( rgb.x, rgb.y );
flMin = min( flMin, rgb.z );
float flMax = V_max( rgb.x, rgb.y );
flMax = V_max( flMax, rgb.z );
float flMin = V_min( rgb.x, rgb.y );
flMin = V_min( flMin, rgb.z );
// hsv.z is the value
hsv.z = flMax;