1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix several MSVC issues numeric.h

-> Round negative numbers correctly CMakeLists.txt
-> Link Json with the static run-time library
This commit is contained in:
SmallJoker 2015-04-29 19:28:25 +02:00 committed by est31
parent 37ca3212ee
commit 6626a3f72f
3 changed files with 16 additions and 2 deletions

View file

@ -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));
}
/*