ReactOS 0.4.17-dev-357-ga8f14ff
math.c File Reference
#include <math.h>
#include <limits.h>
#include "jscript.h"
#include "ntsecapi.h"
#include "wine/debug.h"
Include dependency graph for math.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (jscript)
 
static HRESULT Math_abs (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_acos (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_asin (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_atan (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_atan2 (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_ceil (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_cos (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_exp (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_floor (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_log (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_max (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_min (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_pow (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_random (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_round (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_sin (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_sqrt (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
static HRESULT Math_tan (script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
 
HRESULT create_math (script_ctx_t *ctx, jsdisp_t **ret)
 

Variables

static const builtin_prop_t Math_props []
 
static const builtin_info_t Math_info
 

Function Documentation

◆ create_math()

HRESULT create_math ( script_ctx_t ctx,
jsdisp_t **  ret 
)

Definition at line 503 of file math.c.

504{
505 jsdisp_t *math;
506 unsigned i;
508
509 struct {
510 const WCHAR *name;
511 DOUBLE val;
512 }constants[] = {
513 {L"E", M_E}, /* ECMA-262 3rd Edition 15.8.1.1 */
514 {L"LN10", M_LN10}, /* ECMA-262 3rd Edition 15.8.1.2 */
515 {L"LN2", M_LN2}, /* ECMA-262 3rd Edition 15.8.1.3 */
516 {L"LOG2E", M_LOG2E}, /* ECMA-262 3rd Edition 15.8.1.4 */
517 {L"LOG10E", M_LOG10E}, /* ECMA-262 3rd Edition 15.8.1.5 */
518 {L"PI", M_PI}, /* ECMA-262 3rd Edition 15.8.1.6 */
519 {L"SQRT1_2", M_SQRT1_2}, /* ECMA-262 3rd Edition 15.8.1.7 */
520 {L"SQRT2", M_SQRT2}, /* ECMA-262 3rd Edition 15.8.1.8 */
521 };
522
523 math = calloc(1, sizeof(jsdisp_t));
524 if(!math)
525 return E_OUTOFMEMORY;
526
527 hres = init_dispex_from_constr(math, ctx, &Math_info, ctx->object_constr);
528 if(FAILED(hres)) {
529 free(math);
530 return hres;
531 }
532
533 for(i=0; i < ARRAY_SIZE(constants); i++) {
536 if(FAILED(hres)) {
537 jsdisp_release(math);
538 return hres;
539 }
540 }
541
542 *ret = math;
543 return S_OK;
544}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define free
Definition: debug_ros.c:5
static const builtin_info_t Math_info
Definition: math.c:498
#define M_LN10
Definition: math.h:408
#define M_SQRT2
Definition: math.h:415
#define M_LN2
Definition: math.h:407
#define M_E
Definition: math.h:404
#define M_LOG10E
Definition: math.h:406
#define M_LOG2E
Definition: math.h:405
#define M_SQRT1_2
Definition: math.h:416
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
GLuint GLfloat * val
Definition: glext.h:7180
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT jsdisp_define_data_property(jsdisp_t *obj, const WCHAR *name, unsigned flags, jsval_t value)
Definition: dispex.c:3349
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
Definition: dispex.c:2512
ULONG jsdisp_release(jsdisp_t *obj)
Definition: dispex.c:1911
static jsval_t jsval_number(double n)
Definition: jsval.h:153
#define M_PI
Definition: macros.h:263
HRESULT hres
Definition: protocol.c:465
constants
Definition: resource.c:30
short WCHAR
Definition: pedump.c:58
#define calloc
Definition: rosglue.h:14
Definition: name.c:39
double DOUBLE
Definition: typedefs.h:70

Referenced by init_global().

◆ Math_abs()

static HRESULT Math_abs ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 37 of file math.c.

39{
40 double d;
42
43 TRACE("\n");
44
45 if(!argc) {
46 if(r)
47 *r = jsval_number(NAN);
48 return S_OK;
49 }
50
51 hres = to_number(ctx, argv[0], &d);
52 if(FAILED(hres))
53 return hres;
54
55 if(r)
56 *r = jsval_number(d < 0.0 ? -d : d);
57 return S_OK;
58}
MonoAssembly int argc
Definition: metahost.c:107
#define NAN
Definition: math.h:273
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
HRESULT to_number(script_ctx_t *, jsval_t, double *)
Definition: jsutils.c:630
#define d
Definition: ke_i.h:81
#define argv
Definition: mplay32.c:18
#define TRACE(s)
Definition: solgame.cpp:4

◆ Math_acos()

static HRESULT Math_acos ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 60 of file math.c.

62{
63 double x;
65
66 TRACE("\n");
67
68 if(!argc) {
69 if(r)
70 *r = jsval_number(NAN);
71 return S_OK;
72 }
73
74 hres = to_number(ctx, argv[0], &x);
75 if(FAILED(hres))
76 return hres;
77
78 if(r)
79 *r = jsval_number(x < -1.0 || x > 1.0 ? NAN : acos(x));
80 return S_OK;
81}
_ACRTIMP double __cdecl acos(double)
Definition: acos.c:28
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

◆ Math_asin()

static HRESULT Math_asin ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 83 of file math.c.

85{
86 double x;
88
89 TRACE("\n");
90
91 if(!argc) {
92 if(r)
93 *r = jsval_number(NAN);
94 return S_OK;
95 }
96
97 hres = to_number(ctx, argv[0], &x);
98 if(FAILED(hres))
99 return hres;
100
101 if(r)
102 *r = jsval_number(x < -1.0 || x > 1.0 ? NAN : asin(x));
103 return S_OK;
104}
_ACRTIMP double __cdecl asin(double)
Definition: asin.c:31

◆ Math_atan()

static HRESULT Math_atan ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 106 of file math.c.

108{
109 double x;
111
112 TRACE("\n");
113
114 if(!argc) {
115 if(r)
116 *r = jsval_number(NAN);
117 return S_OK;
118 }
119
120 hres = to_number(ctx, argv[0], &x);
121 if(FAILED(hres))
122 return hres;
123
124 if(r)
125 *r = jsval_number(atan(x));
126 return S_OK;
127}
_ACRTIMP double __cdecl atan(double)
Definition: atan.c:44

◆ Math_atan2()

static HRESULT Math_atan2 ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 129 of file math.c.

131{
132 double x, y;
134
135 TRACE("\n");
136
137 if(argc<2) {
138 if(r)
139 *r = jsval_number(NAN);
140 return S_OK;
141 }
142
143 hres = to_number(ctx, argv[0], &y);
144 if(FAILED(hres))
145 return hres;
146
147 hres = to_number(ctx, argv[1], &x);
148 if(FAILED(hres))
149 return hres;
150
151 if(r)
152 *r = jsval_number(atan2(y, x));
153 return S_OK;
154}
_ACRTIMP double __cdecl atan2(double, double)
Definition: atan2.c:52
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ Math_ceil()

static HRESULT Math_ceil ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 157 of file math.c.

159{
160 double x;
162
163 TRACE("\n");
164
165 if(!argc) {
166 if(r)
167 *r = jsval_number(NAN);
168 return S_OK;
169 }
170
171 hres = to_number(ctx, argv[0], &x);
172 if(FAILED(hres))
173 return hres;
174
175 if(r)
176 *r = jsval_number(ceil(x));
177 return S_OK;
178}
_ACRTIMP double __cdecl ceil(double)
Definition: ceil.c:18

◆ Math_cos()

static HRESULT Math_cos ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 180 of file math.c.

182{
183 double x;
185
186 TRACE("\n");
187
188 if(!argc) {
189 if(r)
190 *r = jsval_number(NAN);
191 return S_OK;
192 }
193
194 hres = to_number(ctx, argv[0], &x);
195 if(FAILED(hres))
196 return hres;
197
198 if(r)
199 *r = jsval_number(cos(x));
200 return S_OK;
201}
_ACRTIMP double __cdecl cos(double)
Definition: cos.c:21

◆ Math_exp()

static HRESULT Math_exp ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 203 of file math.c.

205{
206 double x;
208
209 TRACE("\n");
210
211 if(!argc) {
212 if(r)
213 *r = jsval_number(NAN);
214 return S_OK;
215 }
216
217 hres = to_number(ctx, argv[0], &x);
218 if(FAILED(hres))
219 return hres;
220
221 if(r)
222 *r = jsval_number(exp(x));
223 return S_OK;
224}
DWORD exp
Definition: msg.c:18625

◆ Math_floor()

static HRESULT Math_floor ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 226 of file math.c.

228{
229 double x;
231
232 TRACE("\n");
233
234 if(!argc) {
235 if(r)
236 *r = jsval_number(NAN);
237 return S_OK;
238 }
239
240 hres = to_number(ctx, argv[0], &x);
241 if(FAILED(hres))
242 return hres;
243
244 if(r)
245 *r = jsval_number(floor(x));
246 return S_OK;
247}
_ACRTIMP double __cdecl floor(double)
Definition: floor.c:18

◆ Math_log()

static HRESULT Math_log ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 249 of file math.c.

251{
252 double x;
254
255 TRACE("\n");
256
257 if(!argc) {
258 if(r)
259 *r = jsval_number(NAN);
260 return S_OK;
261 }
262
263 hres = to_number(ctx, argv[0], &x);
264 if(FAILED(hres))
265 return hres;
266
267 if(r)
268 *r = jsval_number(x < -0.0 ? NAN : log(x));
269 return S_OK;
270}
#define log(outFile, fmt,...)
Definition: util.h:15

◆ Math_max()

static HRESULT Math_max ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 273 of file math.c.

275{
276 DOUBLE max, d;
277 DWORD i;
279
280 TRACE("\n");
281
282 if(!argc) {
283 if(r)
285 return S_OK;
286 }
287
288 hres = to_number(ctx, argv[0], &max);
289 if(FAILED(hres))
290 return hres;
291
292 for(i=1; i < argc; i++) {
293 hres = to_number(ctx, argv[i], &d);
294 if(FAILED(hres))
295 return hres;
296
297 if(d > max || isnan(d))
298 max = d;
299 }
300
301 if(r)
302 *r = jsval_number(max);
303 return S_OK;
304}
#define isnan(x)
Definition: math.h:360
#define INFINITY
Definition: math.h:272
unsigned long DWORD
Definition: ntddk_ex.h:95
#define max(a, b)
Definition: svc.c:63

◆ Math_min()

static HRESULT Math_min ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 307 of file math.c.

309{
310 DOUBLE min, d;
311 DWORD i;
313
314 TRACE("\n");
315
316 if(!argc) {
317 if(r)
319 return S_OK;
320 }
321
322 hres = to_number(ctx, argv[0], &min);
323 if(FAILED(hres))
324 return hres;
325
326 for(i=1; i < argc; i++) {
327 hres = to_number(ctx, argv[i], &d);
328 if(FAILED(hres))
329 return hres;
330
331 if(d < min || isnan(d))
332 min = d;
333 }
334
335 if(r)
336 *r = jsval_number(min);
337 return S_OK;
338}
#define min(a, b)
Definition: monoChain.cc:55

◆ Math_pow()

static HRESULT Math_pow ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 341 of file math.c.

343{
344 double x, y;
346
347 TRACE("\n");
348
349 if(argc < 2) {
350 if(r)
351 *r = jsval_number(NAN);
352 return S_OK;
353 }
354
355 hres = to_number(ctx, argv[0], &x);
356 if(FAILED(hres))
357 return hres;
358
359 hres = to_number(ctx, argv[1], &y);
360 if(FAILED(hres))
361 return hres;
362
363 if(r)
364 *r = jsval_number(pow(x, y));
365 return S_OK;
366}
double pow(double x, double y)
Definition: freeldr.c:179

◆ Math_random()

static HRESULT Math_random ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 369 of file math.c.

371{
372 UINT x;
373
374 TRACE("\n");
375
376 if(!RtlGenRandom(&x, sizeof(x)))
377 return E_UNEXPECTED;
378
379 if(r)
380 *r = jsval_number((double)x/(double)UINT_MAX);
381 return S_OK;
382}
#define UINT_MAX
Definition: limits.h:27
unsigned int UINT
Definition: ndis.h:50
#define RtlGenRandom
Definition: ntsecapi.h:691
#define E_UNEXPECTED
Definition: winerror.h:3528

◆ Math_round()

static HRESULT Math_round ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 385 of file math.c.

387{
388 double x;
390
391 TRACE("\n");
392
393 if(!argc) {
394 if(r)
395 *r = jsval_number(NAN);
396 return S_OK;
397 }
398
399 hres = to_number(ctx, argv[0], &x);
400 if(FAILED(hres))
401 return hres;
402
403 if(r)
404 *r = jsval_number(floor(x+0.5));
405 return S_OK;
406}

◆ Math_sin()

static HRESULT Math_sin ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 408 of file math.c.

410{
411 double x;
413
414 TRACE("\n");
415
416 if(!argc) {
417 if(r)
418 *r = jsval_number(NAN);
419 return S_OK;
420 }
421
422 hres = to_number(ctx, argv[0], &x);
423 if(FAILED(hres))
424 return hres;
425
426 if(r)
427 *r = jsval_number(sin(x));
428 return S_OK;
429}
_ACRTIMP double __cdecl sin(double)
Definition: sin.c:21

◆ Math_sqrt()

static HRESULT Math_sqrt ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 431 of file math.c.

433{
434 double x;
436
437 TRACE("\n");
438
439 if(!argc) {
440 if(r)
441 *r = jsval_number(NAN);
442 return S_OK;
443 }
444
445 hres = to_number(ctx, argv[0], &x);
446 if(FAILED(hres))
447 return hres;
448
449 if(r)
450 *r = jsval_number(sqrt(x));
451 return S_OK;
452}
_ACRTIMP double __cdecl sqrt(double)
Definition: sqrt.c:5

◆ Math_tan()

static HRESULT Math_tan ( script_ctx_t ctx,
jsval_t  vthis,
WORD  flags,
unsigned  argc,
jsval_t argv,
jsval_t r 
)
static

Definition at line 454 of file math.c.

456{
457 double x;
459
460 TRACE("\n");
461
462 if(!argc) {
463 if(r)
464 *r = jsval_number(NAN);
465 return S_OK;
466 }
467
468 hres = to_number(ctx, argv[0], &x);
469 if(FAILED(hres))
470 return hres;
471
472 if(r)
473 *r = jsval_number(tan(x));
474 return S_OK;
475}
_ACRTIMP double __cdecl tan(double)
Definition: tan.c:122

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( jscript  )

Variable Documentation

◆ Math_info

const builtin_info_t Math_info
static
Initial value:
= {
.class = JSCLASS_MATH, .props_cnt = ARRAY_SIZE(Math_props),
.props = Math_props,
}
static const builtin_prop_t Math_props[]
Definition: math.c:477
@ JSCLASS_MATH
Definition: jscript.h:111

Definition at line 498 of file math.c.

Referenced by create_math().

◆ Math_props

const builtin_prop_t Math_props[]
static
Initial value:
= {
{L"abs", Math_abs, PROPF_METHOD|1},
{L"acos", Math_acos, PROPF_METHOD|1},
{L"asin", Math_asin, PROPF_METHOD|1},
{L"atan", Math_atan, PROPF_METHOD|1},
{L"atan2", Math_atan2, PROPF_METHOD|2},
{L"ceil", Math_ceil, PROPF_METHOD|1},
{L"cos", Math_cos, PROPF_METHOD|1},
{L"exp", Math_exp, PROPF_METHOD|1},
{L"floor", Math_floor, PROPF_METHOD|1},
{L"log", Math_log, PROPF_METHOD|1},
{L"max", Math_max, PROPF_METHOD|2},
{L"min", Math_min, PROPF_METHOD|2},
{L"pow", Math_pow, PROPF_METHOD|2},
{L"random", Math_random, PROPF_METHOD},
{L"round", Math_round, PROPF_METHOD|1},
{L"sin", Math_sin, PROPF_METHOD|1},
{L"sqrt", Math_sqrt, PROPF_METHOD|1},
{L"tan", Math_tan, PROPF_METHOD|1}
}
static HRESULT Math_cos(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:180
static HRESULT Math_random(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:369
static HRESULT Math_abs(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:37
static HRESULT Math_atan(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:106
static HRESULT Math_log(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:249
static HRESULT Math_pow(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:341
static HRESULT Math_round(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:385
static HRESULT Math_ceil(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:157
static HRESULT Math_atan2(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:129
static HRESULT Math_sqrt(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:431
static HRESULT Math_acos(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:60
static HRESULT Math_floor(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:226
static HRESULT Math_sin(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:408
static HRESULT Math_exp(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:203
static HRESULT Math_min(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:307
static HRESULT Math_asin(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:83
static HRESULT Math_tan(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:454
static HRESULT Math_max(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition: math.c:273
const unsigned int PROPF_METHOD
Definition: jsdisp.idl:33

Definition at line 477 of file math.c.