jscript: math.c added Math.acos() function modified: dlls/jscript/math.c

Patrick Rudolph patrick1804 at web.de
Thu Dec 11 11:11:14 CST 2008


---
 dlls/jscript/math.c |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c
index f2a3d0c..79648c5 100644
--- a/dlls/jscript/math.c
+++ b/dlls/jscript/math.c
@@ -158,8 +158,24 @@ static HRESULT Math=5Fabs(DispatchEx *dispex, LCID lcid=
, WORD flags, DISPPARAMS *d
 static HRESULT Math=5Facos(DispatchEx *dispex, LCID lcid, WORD flags, DISPP=
ARAMS *dp,
         VARIANT *retv, jsexcept=5Ft *ei, IServiceProvider *sp)
 {
-    FIXME("\n");
-    return E=5FNOTIMPL;
+    VARIANT v;
+    HRESULT hres;
+
+    TRACE("\n");
+
+    if(!arg=5Fcnt(dp)) {
+        if(retv)
+            num=5Fset=5Fnan(retv);
+        return S=5FOK;
+    }
+
+    hres =3D to=5Fnumber(dispex->ctx, get=5Farg(dp, 0), ei, &v);
+    if(FAILED(hres))
+        return hres;
+
+    if(retv)
+        num=5Fset=5Fval(retv, acos(num=5Fval(&v)));
+    return S=5FOK;
 }
=20
 static HRESULT Math=5Fasin(DispatchEx *dispex, LCID lcid, WORD flags, DISPP=
ARAMS *dp,
--=20
1.5.6.3


=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Psssst! Schon vom neuen WEB.DE MultiMessenger geh=F6rt=3F=20
Der kann`s mit allen: http://www.produkte.web.de/messenger/=3Fdid=3D3123




More information about the wine-patches mailing list