medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit b73583c4273b8ac0ae17ece27fd21e3dcc801ac0
parent e5dd32c9247cdd9e2c888c011b177428a1a907c7
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Oct 18 20:14:38 +0300

.0f

Diffstat:
int_conversions.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/int_conversions.h b/int_conversions.h @@ -145,7 +145,7 @@ INLINE u64 to_unsigned( s64 x ) { return ( u64 ) x; } */ INLINE u32 quantize01( float x, u32 num_bits ) { - ASSERT( x >= 0 && x <= 1 ); + ASSERT( x >= 0.0f && x <= 1.0f ); return u32( x * checked_cast< float >( ( 1 << num_bits ) - 1 ) + 0.5f ); } @@ -156,7 +156,7 @@ INLINE float dequantize01( u32 q, u32 num_bits ) { } INLINE s32 quantize11( float x, u32 num_bits ) { - ASSERT( x >= -1 && x <= 1 ); + ASSERT( x >= -1.0f && x <= 1.0f ); num_bits--; if( x >= 0 ) { return s32( x * checked_cast< float >( ( 1 << num_bits ) - 1 ) + 0.5f );