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

Patrick Rudolph patrick1804 at web.de
Fri Dec 12 01:39:42 CST 2008


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

diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c
index c7d84c3..440506a 100644
--- a/dlls/jscript/math.c
+++ b/dlls/jscript/math.c
@@ -546,8 +546,23 @@ static HRESULT Math=5Fsqrt(DispatchEx *dispex, LCID lci=
d, WORD flags, DISPPARAMS *
 static HRESULT Math=5Ftan(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA=
RAMS *dp,
         VARIANT *retv, jsexcept=5Ft *ei, IServiceProvider *sp)
 {
-    FIXME("\n");
-    return E=5FNOTIMPL;
+    VARIANT v;
+    HRESULT hres;
+
+    TRACE("\n");
+
+    if(!arg=5Fcnt(dp)) {
+        FIXME("arg=5Fcnt =3D 0\n");
+        return E=5FNOTIMPL;
+    }
+
+    hres =3D to=5Fnumber(dispex->ctx, get=5Farg(dp, 0), ei, &v);
+    if(FAILED(hres))
+        return hres;
+
+    if(retv)
+        num=5Fset=5Fval(retv, tan(num=5Fval(&v)));
+    return S=5FOK;
 }
=20
 static const builtin=5Fprop=5Ft Math=5Fprops[] =3D {
--=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