mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-14 15:31:31 +00:00
Even more math (#56)
Remaining implementations of JavaScript's Math functions (except sin/cos/tan), both double (Math) and single (Mathf) precision, ported from musl incl. tests from libc-test, plus some changes to match JS semantics. Also binds fmod to `%` and pow to `**`.
This commit is contained in:
@ -113,7 +113,7 @@ tests.forEach(filename => {
|
||||
let exports = new WebAssembly.Instance(new WebAssembly.Module(stdout.toBuffer()), {
|
||||
env: {
|
||||
abort: function(msg, file, line, column) {
|
||||
// TODO
|
||||
console.log("abort called at " + line + ":" + column);
|
||||
},
|
||||
externalFunction: function() { },
|
||||
externalConstant: 1,
|
||||
@ -124,6 +124,9 @@ tests.forEach(filename => {
|
||||
externalFunction: function() { },
|
||||
externalConstant: 2
|
||||
},
|
||||
JSOp: {
|
||||
mod: function(a, b) { return a % b; }
|
||||
},
|
||||
JSMath: Math
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user