mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15: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:
parent
e97a229b90
commit
beda751d33
Notes:
sideshowbarker
2024-07-19 07:34:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/beda751d33c
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue