From 6626a3f72f66703a161abccab90cffcec31c3932 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 29 Apr 2015 19:28:25 +0200 Subject: Fix several MSVC issues numeric.h -> Round negative numbers correctly CMakeLists.txt -> Link Json with the static run-time library --- src/util/numeric.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/numeric.h b/src/util/numeric.h index b4b841918..0eba01359 100644 --- a/src/util/numeric.h +++ b/src/util/numeric.h @@ -288,7 +288,7 @@ bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir, */ inline s32 myround(f32 f) { - return floor(f + 0.5); + return (s32)(f < 0.f ? (f - 0.5f) : (f + 0.5f)); } /* -- cgit v1.2.3