medfall

A super great game engine
Log | Files | Refs

commit 74cd624ba772361d683122b79d1b0e82b0c87276
parent 4c6b17656a85cd97b9afe2a4b1564c04e60e34f5
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue, 21 Aug 2018 10:21:21 +0300

MSVC warnings

Diffstat:
linear_algebra.h | 2+-
rng/pcg.cc | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/linear_algebra.h b/linear_algebra.h @@ -825,7 +825,7 @@ forceinline m4 m4_perspective( float vertical_fov_degrees, float aspect_ratio, f forceinline m4 m4_perspective_inf( float vertical_fov_degrees, float aspect_ratio, float near_plane ) { float tan_half_vertical_fov = tanf( deg_to_rad( vertical_fov_degrees ) / 2.0f ); - float epsilon = 2.4e-6; + float epsilon = 2.4e-6f; return m4( 1.0f / ( tan_half_vertical_fov * aspect_ratio ), diff --git a/rng/pcg.cc b/rng/pcg.cc @@ -50,7 +50,7 @@ PCG new_pcg( u64 state, u64 seq ) { u32 rng_next( PCG * pcg ) { u64 oldstate = pcg->state; pcg->state = oldstate * U64( 6364136223846793005 ) + pcg->inc; - u32 xorshifted = ( ( oldstate >> 18 ) ^ oldstate ) >> 27; - u32 rot = oldstate >> 59u; + u32 xorshifted = u32( ( ( oldstate >> 18 ) ^ oldstate ) >> 27 ); + u32 rot = u32( oldstate >> 59 ); return ( xorshifted >> rot ) | ( xorshifted << ( ( -rot ) & 31 ) ); }