Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions public/mathlib/mathlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void inline SinCos( float radians, float *sine, float *cosine )
fstp DWORD PTR [eax]
}
#elif defined( GNUC )
register double __cosr, __sinr;
double __cosr, __sinr;
__asm __volatile__ ("fsincos" : "=t" (__cosr), "=u" (__sinr) : "0" (radians));

*sine = __sinr;
Expand Down Expand Up @@ -629,11 +629,6 @@ template <class T> FORCEINLINE T AVG(T a, T b)
// XYZ macro, for printf type functions - ex printf("%f %f %f",XYZ(myvector));
#define XYZ(v) (v).x,(v).y,(v).z

//
// Returns a clamped value in the range [min, max].
//
#define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val)))

inline float Sign( float x )
{
return fsel( x, 1.0f, -1.0f ); // x >= 0 ? 1.0f : -1.0f
Expand Down
4 changes: 2 additions & 2 deletions public/tier0/threadtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ class CThreadFastMutex
return false;

ThreadMemoryBarrier();
++m_depth;
m_depth = m_depth + 1;
return true;
}

Expand Down Expand Up @@ -744,7 +744,7 @@ class CThreadFastMutex
DebuggerBreak();
#endif

--m_depth;
m_depth = m_depth - 1;
if ( !m_depth )
{
ThreadMemoryBarrier();
Expand Down