(ExecutionContext context, Object o)
| 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 |