MCPcopy Create free account
hub / github.com/dynjs/dynjs / toInteger

Method toInteger

src/main/java/org/dynjs/runtime/Types.java:298–307  ·  view source on GitHub ↗
(ExecutionContext context, Object o)

Source from the content-addressed store, hash-verified

296 }
297
298 public static Long toInteger(ExecutionContext context, Object o) {
299 Number number = toNumber(context, o);
300 if (number instanceof Double) {
301 if (((Double) number).isNaN()) {
302 return 0L;
303 }
304 }
305
306 return number.longValue();
307 }
308
309 public static Long toUint16(ExecutionContext context, Object o) {
310 // 9.7

Callers 15

callMethod · 0.95
callMethod · 0.95
makeTimeMethod · 0.95
makeDayMethod · 0.95
timeClipMethod · 0.95
callMethod · 0.95
callMethod · 0.95
callMethod · 0.95
callMethod · 0.95
callMethod · 0.95
callMethod · 0.95
jaMethod · 0.95

Calls 2

toNumberMethod · 0.95
isNaNMethod · 0.45

Tested by 1

callMethod · 0.76