mirror of
https://github.com/Ed94/HandmadeHero.git
synced 2025-07-01 03:11:04 -07:00
Day 47 complete
Not much code, some fixes.
This commit is contained in:
@ -10,13 +10,15 @@
|
||||
inline
|
||||
f32 abs( f32 value )
|
||||
{
|
||||
return fabsf(value);
|
||||
f32 result = fabsf(value);
|
||||
return result;
|
||||
}
|
||||
|
||||
inline
|
||||
f32 sqrt( f32 value )
|
||||
{
|
||||
return sqrtf(value);
|
||||
f32 result = sqrtf(value);
|
||||
return result;
|
||||
}
|
||||
|
||||
inline
|
||||
@ -113,3 +115,17 @@ b32 bitscan_forward( u32* index, u32 value )
|
||||
#endif
|
||||
return found;
|
||||
}
|
||||
|
||||
inline
|
||||
u32 rotate_left( u32 mask, s32 shift )
|
||||
{
|
||||
u32 result = _rotl( mask, shift);
|
||||
return result;
|
||||
}
|
||||
|
||||
inline
|
||||
u32 rotate_right( u32 mask, s32 shift )
|
||||
{
|
||||
u32 result = _rotl( mask, shift );
|
||||
return result;
|
||||
}
|
||||
|
@ -38,6 +38,9 @@
|
||||
#define gigabytes( x ) ( megabytes( x ) * ( s64 )( 1024 ) )
|
||||
#define terabytes( x ) ( gigabytes( x ) * ( s64 )( 1024 ) )
|
||||
|
||||
#define max( a, b ) ( (a > b) ? (a) : (b) )
|
||||
#define min( a, b ) ( (a < b) ? (a) : (b) )
|
||||
|
||||
// TODO(Ed) : Move to debug header eventually
|
||||
|
||||
#if Build_Development
|
||||
|
Reference in New Issue
Block a user