1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 04:26:03 +08:00

Fix std::swap conflicts.

This commit is contained in:
David Anderson
2020-06-02 10:15:38 -07:00
parent 7d9dbf1cc1
commit f152e66ac8
7 changed files with 28 additions and 28 deletions

View File

@ -382,9 +382,9 @@ void MatrixInvert( const matrix3x4_t& in, matrix3x4_t& out )
Assert( s_bMathlibInitialized );
if ( &in == &out )
{
swap(out[0][1],out[1][0]);
swap(out[0][2],out[2][0]);
swap(out[1][2],out[2][1]);
V_swap(out[0][1],out[1][0]);
V_swap(out[0][2],out[2][0]);
V_swap(out[1][2],out[2][1]);
}
else
{
@ -1266,18 +1266,18 @@ bool SolveInverseQuadraticMonotonic( float x1, float y1, float x2, float y2, flo
// first, sort parameters
if (x1>x2)
{
swap(x1,x2);
swap(y1,y2);
V_swap(x1,x2);
V_swap(y1,y2);
}
if (x2>x3)
{
swap(x2,x3);
swap(y2,y3);
V_swap(x2,x3);
V_swap(y2,y3);
}
if (x1>x2)
{
swap(x1,x2);
swap(y1,y2);
V_swap(x1,x2);
V_swap(y1,y2);
}
// this code is not fast. what it does is when the curve would be non-monotonic, slowly shifts
// the center point closer to the linear line between the endpoints. Should anyone need htis