diff options
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/sys_unix.c | 4 | ||||
-rw-r--r-- | src/sys/sys_win32.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/sys/sys_unix.c b/src/sys/sys_unix.c index 26fb2b29..a712e41d 100644 --- a/src/sys/sys_unix.c +++ b/src/sys/sys_unix.c @@ -803,8 +803,8 @@ void Sys_GLimpInit( void ) void Sys_SetFloatEnv(void) { - // rounding towards 0 - fesetround(FE_TOWARDZERO); + // rounding toward nearest + fesetround(FE_TONEAREST); } /* diff --git a/src/sys/sys_win32.c b/src/sys/sys_win32.c index 2988d83c..25e18424 100644 --- a/src/sys/sys_win32.c +++ b/src/sys/sys_win32.c @@ -61,14 +61,14 @@ Set FPU control word to default value #define _MCW_EM 0x0008001fU #define _MCW_RC 0x00000300U #define _MCW_PC 0x00030000U - #define _RC_CHOP 0x00000300U + #define _RC_NEAR 0x00000000U #define _PC_53 0x00010000U unsigned int _controlfp(unsigned int new, unsigned int mask); #endif #define FPUCWMASK1 (_MCW_RC | _MCW_EM) -#define FPUCW (_RC_CHOP | _MCW_EM | _PC_53) +#define FPUCW (_RC_NEAR | _MCW_EM | _PC_53) #if idx64 #define FPUCWMASK (FPUCWMASK1) |