mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 22:41:27 +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:
@ -363,9 +363,12 @@ exports.main = function main(argv, options, callback) {
|
||||
assemblyscript.setImportTable(compilerOptions, !!args.importTable);
|
||||
assemblyscript.setMemoryBase(compilerOptions, args.memoryBase >>> 0);
|
||||
assemblyscript.setSourceMap(compilerOptions, args.sourceMap != null);
|
||||
assemblyscript.setGlobalAlias(compilerOptions, "Math", "NativeMath");
|
||||
|
||||
// Add or override global aliases if specified
|
||||
// Initialize default aliases
|
||||
assemblyscript.setGlobalAlias(compilerOptions, "Math", "NativeMath");
|
||||
assemblyscript.setGlobalAlias(compilerOptions, "Mathf", "NativeMathf");
|
||||
|
||||
// Add or override aliases if specified
|
||||
var aliases = args.use;
|
||||
if (aliases != null) {
|
||||
if (typeof aliases === "string") aliases = aliases.split(",");
|
||||
|
Reference in New Issue
Block a user