Commit fe5785af authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

jscript: Added Math_cos implementation.

parent 885a9e9c
......@@ -212,8 +212,22 @@ static HRESULT Math_ceil(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *
static HRESULT Math_cos(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
FIXME("\n");
return E_NOTIMPL;
VARIANT v;
HRESULT hres;
TRACE("\n");
if(!arg_cnt(dp)) {
if(retv) num_set_nan(retv);
return S_OK;
}
hres = to_number(dispex->ctx, get_arg(dp, 0), ei, &v);
if(FAILED(hres))
return hres;
if(retv) num_set_val(retv, cos(num_val(&v)));
return S_OK;
}
static HRESULT Math_exp(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment