MCPcopy Create free account
hub / github.com/mozilla/rhino / acos

Method acos

rhino/src/main/java/org/mozilla/javascript/NativeMath.java:100–109  ·  view source on GitHub ↗
(
            Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args)

Source from the content-addressed store, hash-verified

98 }
99
100 private static Object acos(
101 Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) {
102 double x = ScriptRuntime.toNumber(args, 0);
103 if (!Double.isNaN(x) && -1.0 <= x && x <= 1.0) {
104 x = Math.acos(x);
105 } else {
106 x = Double.NaN;
107 }
108 return ScriptRuntime.wrapNumber(x);
109 }
110
111 private static Object acosh(
112 Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) {

Callers 1

15.8.2.2.jsFile · 0.80

Calls 3

toNumberMethod · 0.95
wrapNumberMethod · 0.95
isNaNMethod · 0.45

Tested by

no test coverage detected