1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 04:26:03 +08:00
Files
hl2sdk/public/mathlib/math_pfns.h
2025-02-19 18:36:16 -05:00

29 lines
643 B
C

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=====================================================================================//
#ifndef _MATH_PFNS_H_
#define _MATH_PFNS_H_
#pragma once
#include <math.h>
// misyl: This is faster than doing fsincos these days.
inline void SinCos( float radians, float *RESTRICT sine, float *RESTRICT cosine )
{
*sine = sinf( radians );
*cosine = cosf( radians );
}
#define FastRSqrt( x ) ( 1.0f / ::sqrtf( x ) )
#define FastCos ::cosf
#define FastSqrt ::sqrtf
#define FastSinCos ::SinCos
#define FastRSqrtFast FastRSqrt
#endif // _MATH_PFNS_H_