forked from qt-creator/qt-creator
Locator/JavaScript: Fix min/max with more than 2 arguments
Pass a variable amount of arguments along Task-number: QTCREATORBUG-20167 Change-Id: I3643aca8c18cba14beb8d625b62f45aa4b39d2a4 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -3112,11 +3112,11 @@
|
|||||||
\li log(x)
|
\li log(x)
|
||||||
\li Returns the natural logarithm (base E) of x
|
\li Returns the natural logarithm (base E) of x
|
||||||
\row
|
\row
|
||||||
\li max(x, y)
|
\li max([value1[, value2[, ...]]])
|
||||||
\li Returns the higher value of x and y
|
\li Returns the highest value of the given numbers
|
||||||
\row
|
\row
|
||||||
\li min(x, y)
|
\li min([value1[, value2[, ...]]])
|
||||||
\li Returns the lower value of x and y
|
\li Returns the lowest value of the given numbers
|
||||||
\row
|
\row
|
||||||
\li oct(x)
|
\li oct(x)
|
||||||
\li Returns the octal representation of x
|
\li Returns the octal representation of x
|
||||||
|
@@ -133,8 +133,8 @@ void JavaScriptFilter::setupEngine()
|
|||||||
"function floor(x) { return Math.floor(x); }\n"
|
"function floor(x) { return Math.floor(x); }\n"
|
||||||
"function hex(x) { return '0x' + x.toString(16); }\n"
|
"function hex(x) { return '0x' + x.toString(16); }\n"
|
||||||
"function log(x) { return Math.log(x); }\n"
|
"function log(x) { return Math.log(x); }\n"
|
||||||
"function max(x, y) { return Math.max(x, y); }\n"
|
"function max() { return Math.max.apply(null, arguments); }\n"
|
||||||
"function min(x, y) { return Math.min(x, y); }\n"
|
"function min() { return Math.min.apply(null, arguments); }\n"
|
||||||
"function oct(x) { return '0' + x.toString(8); }\n"
|
"function oct(x) { return '0' + x.toString(8); }\n"
|
||||||
"function pi() { return Math.PI; }\n"
|
"function pi() { return Math.PI; }\n"
|
||||||
"function pow(x, y) { return Math.pow(x, y); }\n"
|
"function pow(x, y) { return Math.pow(x, y); }\n"
|
||||||
|
Reference in New Issue
Block a user