more
[ICEs.git] / 137526 / jsmath.i.4
1 typedef int (*JSNative) (void *cx, void *obj, unsigned int argc, long *argv,
2 long *rval);
3 int math_round(void *cx, void *obj, unsigned int argc, long *argv, long *rval)
4 {
5 double x;
6 return js_NewNumberValue(cx, copysign(floor(x + 0.5), x), rval);
7 }
8 int math_toSource(void *cx, void *obj, unsigned int argc, long *argv,
9 long *rval)
10 {
11 }
12 void *math__methods[];
13 void *js_InitMathClass(void *cx, void *obj)
14 {
15 void *Math;
16 if (!JS_DefineFunctions(cx, Math, math__methods))
17 return ((void *)0);
18 }