blob: a7253a5ba932db6857427881c8fb23e085bf4232 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Runtime/Object.h>
namespace JS {
class MathObject final : public Object {
JS_OBJECT(MathObject, Object);
public:
virtual void initialize(Realm&) override;
virtual ~MathObject() override = default;
private:
explicit MathObject(Realm&);
JS_DECLARE_NATIVE_FUNCTION(abs);
JS_DECLARE_NATIVE_FUNCTION(random);
JS_DECLARE_NATIVE_FUNCTION(sqrt);
JS_DECLARE_NATIVE_FUNCTION(floor);
JS_DECLARE_NATIVE_FUNCTION(ceil);
JS_DECLARE_NATIVE_FUNCTION(round);
JS_DECLARE_NATIVE_FUNCTION(max);
JS_DECLARE_NATIVE_FUNCTION(min);
JS_DECLARE_NATIVE_FUNCTION(trunc);
JS_DECLARE_NATIVE_FUNCTION(sin);
JS_DECLARE_NATIVE_FUNCTION(cos);
JS_DECLARE_NATIVE_FUNCTION(tan);
JS_DECLARE_NATIVE_FUNCTION(pow);
JS_DECLARE_NATIVE_FUNCTION(exp);
JS_DECLARE_NATIVE_FUNCTION(expm1);
JS_DECLARE_NATIVE_FUNCTION(sign);
JS_DECLARE_NATIVE_FUNCTION(clz32);
JS_DECLARE_NATIVE_FUNCTION(acos);
JS_DECLARE_NATIVE_FUNCTION(acosh);
JS_DECLARE_NATIVE_FUNCTION(asin);
JS_DECLARE_NATIVE_FUNCTION(asinh);
JS_DECLARE_NATIVE_FUNCTION(atan);
JS_DECLARE_NATIVE_FUNCTION(atanh);
JS_DECLARE_NATIVE_FUNCTION(log1p);
JS_DECLARE_NATIVE_FUNCTION(cbrt);
JS_DECLARE_NATIVE_FUNCTION(atan2);
JS_DECLARE_NATIVE_FUNCTION(fround);
JS_DECLARE_NATIVE_FUNCTION(hypot);
JS_DECLARE_NATIVE_FUNCTION(imul);
JS_DECLARE_NATIVE_FUNCTION(log);
JS_DECLARE_NATIVE_FUNCTION(log2);
JS_DECLARE_NATIVE_FUNCTION(log10);
JS_DECLARE_NATIVE_FUNCTION(sinh);
JS_DECLARE_NATIVE_FUNCTION(cosh);
JS_DECLARE_NATIVE_FUNCTION(tanh);
};
}
|