LibJS: Add builtin for Math.random()

This commit is contained in:
Andreas Kling 2025-04-03 12:01:31 +02:00 committed by Andreas Kling
parent 714e8aec8a
commit ec590ef3e6
Notes: github-actions[bot] 2025-04-03 11:57:34 +00:00
4 changed files with 22 additions and 13 deletions

View file

@ -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: