summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/NumberObject.h
blob: 16fd7fd2d9cdb09ae05929d1b9b6f93ec1838080 (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
/*
 * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibJS/Runtime/Object.h>

namespace JS {

class NumberObject : public Object {
    JS_OBJECT(NumberObject, Object);

public:
    static NumberObject* create(Realm&, double);

    NumberObject(double, Object& prototype);
    virtual ~NumberObject() override = default;

    double number() const { return m_value; }

private:
    double m_value { 0 };
};

}