Math.Max(L, R)
.Max() method returns the greater of the two values passed into it. The Functions and Operators equivalent is MAX(eExpression1, eExpression2 (, eExpression3 ...)).
Applies To
Properties and Methods
None
Available
The .Max(L, R) method is available in:
- 15.03.016
- All newer builds
Type
Int32
Syntax
Math.Max(L, R);
Parameters
|
Parameter |
Required |
Description |
|---|---|---|
|
L |
Yes |
A number. Non-numeric values will result in a scripting error message.' |
|
R |
Yes |
A number. Non-numeric values will result in a scripting error message.' |
Example
Event.Form.MessageBox('Math.Max(1, 2): ' + Math.Max(1, 2) +
'\nMath.Max(-1, -2): ' + Math.Max(-1, -2));
/* Expected Prompt Results:
Math.Max(1, 2): 2
Math.Max(-1, -2): -1
*/