mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 18:01:31 +00:00
Move fmod/fmodf to builtins and bind them to the '%' operator
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user