jscript: math.c added Math.atan2() function modified: dlls/jscript/math.c
Patrick Rudolph
patrick1804 at web.de
Fri Dec 12 01:26:35 CST 2008
---
dlls/jscript/math.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c
index 1ef1fe0..ae20ee8 100644
--- a/dlls/jscript/math.c
+++ b/dlls/jscript/math.c
@@ -227,8 +227,27 @@ static HRESULT Math=5Fatan(DispatchEx *dispex, LCID lci=
d, WORD flags, DISPPARAMS *
static HRESULT Math=5Fatan2(DispatchEx *dispex, LCID lcid, WORD flags, DISP=
PARAMS *dp,
VARIANT *retv, jsexcept=5Ft *ei, IServiceProvider *sp)
{
- FIXME("\n");
- return E=5FNOTIMPL;
+ VARIANT x, y;
+ HRESULT hres;
+
+ TRACE("\n");
+
+ if(arg=5Fcnt(dp) < 2) {
+ FIXME("unimplemented arg=5Fcnt %d\n", arg=5Fcnt(dp));
+ return E=5FNOTIMPL;
+ }
+
+ hres =3D to=5Fnumber(dispex->ctx, get=5Farg(dp, 0), ei, &x);
+ if(FAILED(hres))
+ return hres;
+
+ hres =3D to=5Fnumber(dispex->ctx, get=5Farg(dp, 1), ei, &y);
+ if(FAILED(hres))
+ return hres;
+
+ if(retv)
+ num=5Fset=5Fval(retv, atan2(num=5Fval(&x),num=5Fval(&y)) );
+ return S=5FOK;
}
=20
/* ECMA-262 3rd Edition 15.8.2.6 */
--=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=5F=5F=5F
Sensationsangebot verl=E4ngert: WEB.DE FreeDSL - Telefonanschluss + DSL
f=FCr nur 16,37 Euro/mtl.!* http://dsl.web.de/=3Fac=3DOM.AD.AD008K15039B7069a
More information about the wine-patches
mailing list