diff options
author | Emanuele Torre <torreemanuele6@gmail.com> | 2020-04-06 14:08:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 14:08:56 +0200 |
commit | ba67fc68b8477488e6f7f06e28ec9b6ba3a3e2f2 (patch) | |
tree | 8256083a30e85a25251c1e9eeb540dd3047c57f7 /Libraries | |
parent | 67f7763ab95e65a978bb6f7378706527482900a5 (diff) | |
download | serenity-ba67fc68b8477488e6f7f06e28ec9b6ba3a3e2f2.zip |
LibJS: Rename variable "max" to "min" in MathObject::min() (#1665)
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibJS/Runtime/MathObject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Libraries/LibJS/Runtime/MathObject.cpp b/Libraries/LibJS/Runtime/MathObject.cpp index c5b0cf2eac..aa49dc5ab0 100644 --- a/Libraries/LibJS/Runtime/MathObject.cpp +++ b/Libraries/LibJS/Runtime/MathObject.cpp @@ -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) |