Skip to content

Commit beda751

Browse files
committed
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.
1 parent e97a229 commit beda751

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Libraries/LibJS/Runtime/MathObject.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ Value MathObject::round(Interpreter& interpreter)
108108
auto number = interpreter.argument(0).to_number();
109109
if (number.is_nan())
110110
return js_nan();
111-
// FIXME: Use ::round() instead of ::roundf().
112-
return Value(::roundf(number.as_double()));
111+
return Value(::round(number.as_double()));
113112
}
114113

115114
Value MathObject::max(Interpreter& interpreter)

0 commit comments

Comments
 (0)