(
Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args)
| 89 | } |
| 90 | |
| 91 | private static Object abs( |
| 92 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |
| 93 | double x = ScriptRuntime.toNumber(args, 0); |
| 94 | // abs(-0.0) should be 0.0, but -0.0 < 0.0 == false |
| 95 | x = (x == 0.0) ? 0.0 : (x < 0.0) ? -x : x; |
| 96 | |
| 97 | return ScriptRuntime.wrapNumber(x); |
| 98 | } |
| 99 | |
| 100 | private static Object acos( |
| 101 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |