mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibJS: Rename variable "max" to "min" in MathObject::min() (#1665)
This commit is contained in:
parent
67f7763ab9
commit
ba67fc68b8
1 changed files with 3 additions and 3 deletions
|
@ -136,12 +136,12 @@ Value MathObject::min(Interpreter& interpreter)
|
||||||
if (interpreter.argument_count() == 1)
|
if (interpreter.argument_count() == 1)
|
||||||
return interpreter.argument(0).to_number();
|
return interpreter.argument(0).to_number();
|
||||||
|
|
||||||
Value max = interpreter.argument(0).to_number();
|
Value min = interpreter.argument(0).to_number();
|
||||||
for (size_t i = 1; i < interpreter.argument_count(); ++i) {
|
for (size_t i = 1; i < interpreter.argument_count(); ++i) {
|
||||||
Value cur = interpreter.argument(i).to_number();
|
Value cur = interpreter.argument(i).to_number();
|
||||||
max = Value(cur.as_double() < max.as_double() ? cur : max);
|
min = Value(cur.as_double() < min.as_double() ? cur : min);
|
||||||
}
|
}
|
||||||
return max;
|
return min;
|
||||||
}
|
}
|
||||||
|
|
||||||
Value MathObject::trunc(Interpreter& interpreter)
|
Value MathObject::trunc(Interpreter& interpreter)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue