/* * Copyright (c) 2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace JS { class NumberObject : public Object { JS_OBJECT(NumberObject, Object); GC_DECLARE_ALLOCATOR(NumberObject); public: static GC::Ref create(Realm&, double); virtual ~NumberObject() override = default; double number() const { return m_value; } protected: NumberObject(double, Object& prototype); private: double m_value { 0 }; }; }