mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 10:42:51 +00:00
LibJS: Add builtin for Math.random()
This commit is contained in:
parent
714e8aec8a
commit
ec590ef3e6
Notes:
github-actions[bot]
2025-04-03 11:57:34 +00:00
Author: https://github.com/awesomekling
Commit: ec590ef3e6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4204
4 changed files with 22 additions and 13 deletions
|
@ -2599,6 +2599,8 @@ static ThrowCompletionOr<Value> dispatch_builtin_call(Bytecode::Interpreter& int
|
|||
return TRY(MathObject::floor_impl(interpreter.vm(), interpreter.get(arguments[0])));
|
||||
case Builtin::MathImul:
|
||||
return TRY(MathObject::imul_impl(interpreter.vm(), interpreter.get(arguments[0]), interpreter.get(arguments[1])));
|
||||
case Builtin::MathRandom:
|
||||
return MathObject::random_impl();
|
||||
case Builtin::MathRound:
|
||||
return TRY(MathObject::round_impl(interpreter.vm(), interpreter.get(arguments[0])));
|
||||
case Builtin::MathSqrt:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue