mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibJS: Rename variable "max" to "min" in MathObject::min() (#1665)
This commit is contained in:
parent
67f7763ab9
commit
ba67fc68b8
Notes:
sideshowbarker
2024-07-19 07:51:33 +09:00
Author: https://github.com/emanuele6 🔰 Commit: https://github.com/SerenityOS/serenity/commit/ba67fc68b84 Pull-request: https://github.com/SerenityOS/serenity/pull/1665
1 changed files with 3 additions and 3 deletions
|
@ -136,12 +136,12 @@ Value MathObject::min(Interpreter& interpreter)
|
|||
if (interpreter.argument_count() == 1)
|
||||
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) {
|
||||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue