Don't use deprecated fmod in VM (#9837)

* Don't use deprecated fmod in VM

* Update changelog
This commit is contained in:
Andreas Rumpf 2018-12-04 16:50:54 +01:00 • committed by GitHub
commit 5abb6caed8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -106,5 +106,6 @@ proc enumToString*(enums: openArray[enum]): string =
documentation. documentation.
### Compiler changes ### Compiler changes
- The deprecated `fmod` proc is now unavailable on the VM'.
### Bugfixes ### Bugfixes

View file

@ -11,7 +11,7 @@
#import vmdeps, vm #import vmdeps, vm
from math import sqrt, ln, log10, log2, exp, round, arccos, arcsin, from math import sqrt, ln, log10, log2, exp, round, arccos, arcsin,
arctan, arctan2, cos, cosh, hypot, sinh, sin, tan, tanh, pow, trunc, arctan, arctan2, cos, cosh, hypot, sinh, sin, tan, tanh, pow, trunc,
floor, ceil, `mod`, fmod floor, ceil, `mod`
from os import getEnv, existsEnv, dirExists, fileExists, putEnv, walkDir from os import getEnv, existsEnv, dirExists, fileExists, putEnv, walkDir
@ -102,7 +102,6 @@ proc registerAdditionalOps*(c: PCtx) =
wrap1f_math(trunc) wrap1f_math(trunc)
wrap1f_math(floor) wrap1f_math(floor)
wrap1f_math(ceil) wrap1f_math(ceil)
wrap2f_math(fmod)
proc `mod Wrapper`(a: VmArgs) {.nimcall.} = proc `mod Wrapper`(a: VmArgs) {.nimcall.} =
setResult(a, `mod`(getFloat(a, 0), getFloat(a, 1))) setResult(a, `mod`(getFloat(a, 0), getFloat(a, 1)))