(
Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args)
| 601 | } |
| 602 | |
| 603 | private static Object sign( |
| 604 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |
| 605 | double x = ScriptRuntime.toNumber(args, 0); |
| 606 | if (!Double.isNaN(x)) { |
| 607 | if (x == 0) { |
| 608 | if (1 / x > 0) { |
| 609 | return ScriptRuntime.zeroObj; |
| 610 | } |
| 611 | return ScriptRuntime.negativeZeroObj; |
| 612 | } |
| 613 | return Double.valueOf(Math.signum(x)); |
| 614 | } |
| 615 | return ScriptRuntime.NaNobj; |
| 616 | } |
| 617 | |
| 618 | private static Object sin( |
| 619 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |
no test coverage detected