summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/MathObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Runtime/MathObject.cpp')
-rw-r--r--Libraries/LibJS/Runtime/MathObject.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/Libraries/LibJS/Runtime/MathObject.cpp b/Libraries/LibJS/Runtime/MathObject.cpp
index cc46ae17fd..19a2e50fb4 100644
--- a/Libraries/LibJS/Runtime/MathObject.cpp
+++ b/Libraries/LibJS/Runtime/MathObject.cpp
@@ -60,9 +60,6 @@ MathObject::~MathObject()
Value MathObject::abs(Interpreter& interpreter)
{
- if (!interpreter.argument_count())
- return js_nan();
-
auto number = interpreter.argument(0).to_number();
if (number.is_nan())
return js_nan();
@@ -81,9 +78,6 @@ Value MathObject::random(Interpreter&)
Value MathObject::sqrt(Interpreter& interpreter)
{
- if (!interpreter.argument_count())
- return js_nan();
-
auto number = interpreter.argument(0).to_number();
if (number.is_nan())
return js_nan();
@@ -92,9 +86,6 @@ Value MathObject::sqrt(Interpreter& interpreter)
Value MathObject::floor(Interpreter& interpreter)
{
- if (!interpreter.argument_count())
- return js_nan();
-
auto number = interpreter.argument(0).to_number();
if (number.is_nan())
return js_nan();
@@ -103,9 +94,6 @@ Value MathObject::floor(Interpreter& interpreter)
Value MathObject::ceil(Interpreter& interpreter)
{
- if (!interpreter.argument_count())
- return js_nan();
-
auto number = interpreter.argument(0).to_number();
if (number.is_nan())
return js_nan();
@@ -114,9 +102,6 @@ Value MathObject::ceil(Interpreter& interpreter)
Value MathObject::round(Interpreter& interpreter)
{
- if (!interpreter.argument_count())
- return js_nan();
-
auto number = interpreter.argument(0).to_number();
if (number.is_nan())
return js_nan();
@@ -158,9 +143,6 @@ Value MathObject::min(Interpreter& interpreter)
Value MathObject::trunc(Interpreter& interpreter)
{
- if (!interpreter.argument_count())
- return js_nan();
-
auto number = interpreter.argument(0).to_number();
if (number.is_nan())
return js_nan();