Move fmod/fmodf to builtins and bind them to the '%' operator

This commit is contained in:
dcodeIO
2018-03-24 18:39:20 +01:00
parent 721d77012b
commit c80bf35747
21 changed files with 4378 additions and 4209 deletions

View File

@ -169,4 +169,13 @@ globalScope["isString"] = function isString(arg) {
globalScope["isArray"] = Array.isArray;
require("./portable/memory");
globalScope["fmod"] = function fmod(x, y) {
return x % y;
};
globalScope["fmodf"] = function fmodf(x, y) {
return Math.fround(x % y);
};
require("./portable/math")(globalScope);
require("./portable/memory")(globalScope);