mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibJS: Add the Number.{MAX, MIN}_VALUE constants
This commit is contained in:
parent
3dab9d0b5c
commit
0f8ed6183b
Notes:
sideshowbarker
2024-07-18 16:52:16 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/0f8ed6183b1 Pull-request: https://github.com/SerenityOS/serenity/pull/7796 Reviewed-by: https://github.com/linusg
2 changed files with 4 additions and 0 deletions
|
@ -24,7 +24,9 @@ namespace JS {
|
|||
P(LOG10E) \
|
||||
P(LOG2E) \
|
||||
P(MAX_SAFE_INTEGER) \
|
||||
P(MAX_VALUE) \
|
||||
P(MIN_SAFE_INTEGER) \
|
||||
P(MIN_VALUE) \
|
||||
P(Math) \
|
||||
P(NEGATIVE_INFINITY) \
|
||||
P(NaN) \
|
||||
|
|
|
@ -40,6 +40,8 @@ void NumberConstructor::initialize(GlobalObject& global_object)
|
|||
define_property(vm.names.prototype, global_object.number_prototype(), 0);
|
||||
define_property(vm.names.length, Value(1), Attribute::Configurable);
|
||||
define_property(vm.names.EPSILON, Value(EPSILON_VALUE), 0);
|
||||
define_property(vm.names.MAX_VALUE, Value(NumericLimits<double>::max()), 0);
|
||||
define_property(vm.names.MIN_VALUE, Value(NumericLimits<double>::min()), 0);
|
||||
define_property(vm.names.MAX_SAFE_INTEGER, Value(MAX_SAFE_INTEGER_VALUE), 0);
|
||||
define_property(vm.names.MIN_SAFE_INTEGER, Value(MIN_SAFE_INTEGER_VALUE), 0);
|
||||
define_property(vm.names.NEGATIVE_INFINITY, js_negative_infinity(), 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue