diff options
author | Li Jin <dragon-fly@qq.com> | 2024-10-19 00:35:11 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2024-10-19 00:35:11 +0800 |
commit | 1334c0ae67fdf4cb1377e0e7a3ef291f5cf694c0 (patch) | |
tree | 8bd3fbeb396fd2fce6e5b34c3ee10f4923feca72 /src/3rdParty/lua/lmathlib.c | |
parent | 05da3cbfa3689e6c229c41156d0dd08ab554cd77 (diff) | |
download | yuescript-1334c0ae67fdf4cb1377e0e7a3ef291f5cf694c0.tar.gz yuescript-1334c0ae67fdf4cb1377e0e7a3ef291f5cf694c0.tar.bz2 yuescript-1334c0ae67fdf4cb1377e0e7a3ef291f5cf694c0.zip |
Fixed issue #174.
Diffstat (limited to 'src/3rdParty/lua/lmathlib.c')
-rw-r--r-- | src/3rdParty/lua/lmathlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/3rdParty/lua/lmathlib.c b/src/3rdParty/lua/lmathlib.c index f140d62..4381063 100644 --- a/src/3rdParty/lua/lmathlib.c +++ b/src/3rdParty/lua/lmathlib.c | |||
@@ -352,7 +352,7 @@ static lua_Number I2d (Rand64 x) { | |||
352 | SRand64 sx = (SRand64)(trim64(x) >> shift64_FIG); | 352 | SRand64 sx = (SRand64)(trim64(x) >> shift64_FIG); |
353 | lua_Number res = (lua_Number)(sx) * scaleFIG; | 353 | lua_Number res = (lua_Number)(sx) * scaleFIG; |
354 | if (sx < 0) | 354 | if (sx < 0) |
355 | res += 1.0; /* correct the two's complement if negative */ | 355 | res += l_mathop(1.0); /* correct the two's complement if negative */ |
356 | lua_assert(0 <= res && res < 1); | 356 | lua_assert(0 <= res && res < 1); |
357 | return res; | 357 | return res; |
358 | } | 358 | } |