MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / toInteger

Function toInteger

ServerEditorWeb/ace/worker-lua.js:3505–3513  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

3503}
3504
3505function toInteger(n) {
3506 n = +n;
3507 if (n !== n) { // isNaN
3508 n = 0;
3509 } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
3510 n = (n > 0 || -1) * Math.floor(Math.abs(n));
3511 }
3512 return n;
3513}
3514
3515function isPrimitive(input) {
3516 var type = typeof input;

Callers 1

worker-lua.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected