Minor refactoring; Fix n-body TS build

This commit is contained in:
dcodeIO
2018-04-28 18:07:20 +02:00
parent 2aea14b518
commit 8b5d1d7f74
13 changed files with 296 additions and 310 deletions

2
std/portable.d.ts vendored
View File

@ -183,6 +183,8 @@ declare function bswap16<T = i16 | u16 | i32 | u32>(value: T): T;
/** Changes the type of any value of `usize` kind to another one of `usize` kind. Useful for casting class instances to their pointer values and vice-versa. Beware that this is unsafe.*/
declare function changetype<T>(value: any): T;
/** Explicitly requests no bounds checks on the provided expression. Useful for array accesses. */
declare function unchecked<T>(value: T): T;
/** Tests if a 32-bit or 64-bit float is `NaN`. */
declare function isNaN<T = f32 | f64>(value: T): bool;
/** Tests if a 32-bit or 64-bit float is finite, that is not `NaN` or +/-`Infinity`. */

View File

@ -202,6 +202,10 @@ globalScope["isString"] = function isString(arg) {
globalScope["isArray"] = Array.isArray;
globalScope["unchecked"] = function(expr) {
return expr;
};
globalScope["fmod"] = function fmod(x, y) {
return x % y;
};