mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +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: 0f8ed6183b
Pull-request: https://github.com/SerenityOS/serenity/pull/7796
Reviewed-by: https://github.com/linusg
2 changed files with 4 additions and 0 deletions
|
@ -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
Add a link
Reference in a new issue