mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-21 10:41:42 +00:00
Minor refactoring; Fix n-body TS build
This commit is contained in:
2
std/portable.d.ts
vendored
2
std/portable.d.ts
vendored
@ -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`. */
|
||||
|
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user