jscript: math.c added Math.sqrt() function modified: dlls/jscript/math.c
Patrick Rudolph
patrick1804 at web.de
Fri Dec 12 01:38:51 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 6fda5ed..c7d84c3 100644
--- a/dlls/jscript/math.c
+++ b/dlls/jscript/math.c
@@ -524,8 +524,23 @@ static HRESULT Math=5Fsin(DispatchEx *dispex, LCID lcid=
, WORD flags, DISPPARAMS *d
static HRESULT Math=5Fsqrt(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)) {
+ 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, sqrt(num=5Fval(&v)));
+ return S=5FOK;
}
=20
static HRESULT Math=5Ftan(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA=
RAMS *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=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