mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibJS: Math.round() should call round() instead of roundf()
Neither LibM functions are very strong right now, but let's at least call the right one.
This commit is contained in:
@@ -108,8 +108,7 @@ Value MathObject::round(Interpreter& interpreter)
|
||||
auto number = interpreter.argument(0).to_number();
|
||||
if (number.is_nan())
|
||||
return js_nan();
|
||||
// FIXME: Use ::round() instead of ::roundf().
|
||||
return Value(::roundf(number.as_double()));
|
||||
return Value(::round(number.as_double()));
|
||||
}
|
||||
|
||||
Value MathObject::max(Interpreter& interpreter)
|
||||
|
||||
Reference in New Issue
Block a user