2020-04-04 23:13:13 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-04-04 23:13:13 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/Object.h>
|
|
|
|
|
|
|
|
namespace JS {
|
|
|
|
|
2020-04-10 13:04:12 +02:00
|
|
|
class NumberObject : public Object {
|
2020-06-21 15:14:02 +02:00
|
|
|
JS_OBJECT(NumberObject, Object);
|
|
|
|
|
2020-04-04 23:13:13 +02:00
|
|
|
public:
|
2020-04-17 18:55:53 +02:00
|
|
|
static NumberObject* create(GlobalObject&, double);
|
|
|
|
|
|
|
|
NumberObject(double, Object& prototype);
|
2020-04-04 23:13:13 +02:00
|
|
|
virtual ~NumberObject() override;
|
|
|
|
|
2020-07-14 15:26:15 -07:00
|
|
|
double number() const { return m_value; }
|
|
|
|
|
2020-04-04 23:13:13 +02:00
|
|
|
private:
|
|
|
|
double m_value { 0 };
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|