1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibJS: Add Math.random() :^)

This commit is contained in:
Andreas Kling 2020-03-21 17:52:12 +01:00
parent c4c549625f
commit 8b18674229
4 changed files with 89 additions and 0 deletions

View file

@ -4,6 +4,7 @@
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/ConsoleObject.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/MathObject.h>
#include <LibJS/Runtime/NativeFunction.h>
#include <LibJS/Runtime/Value.h>
@ -17,6 +18,7 @@ GlobalObject::GlobalObject()
this_object->heap().collect_garbage();
return js_undefined();
});
put("Math", heap().allocate<MathObject>());
}
GlobalObject::~GlobalObject()