mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user