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:
parent
37ca3212ee
commit
6626a3f72f
3 changed files with 16 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue