(
Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args)
| 488 | } |
| 489 | |
| 490 | private static Object log2( |
| 491 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |
| 492 | double x = ScriptRuntime.toNumber(args, 0); |
| 493 | // Java's log(<0) = -Infinity; we need NaN |
| 494 | x = (x < 0) ? Double.NaN : Math.log(x) * LOG2E; |
| 495 | return ScriptRuntime.wrapNumber(x); |
| 496 | } |
| 497 | |
| 498 | private static Object max( |
| 499 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |
no test coverage detected