(
Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args)
| 507 | } |
| 508 | |
| 509 | private static Object min( |
| 510 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |
| 511 | double x = Double.POSITIVE_INFINITY; |
| 512 | for (int i = 0; i != args.length; ++i) { |
| 513 | double d = ScriptRuntime.toNumber(args[i]); |
| 514 | // if (x < d) x = d; does not work due to -0.0 >= +0.0 |
| 515 | x = Math.min(x, d); |
| 516 | } |
| 517 | return ScriptRuntime.wrapNumber(x); |
| 518 | } |
| 519 | |
| 520 | // See Ecma 15.8.2.13 |
| 521 | private static Object pow( |