math.max
From GMod Wiki
(Redirected from Math.Max)
Function | |
Syntax |
math.max( Number a , Number b, ... ) Where is this used? |
Description: | |
Return the larger of a and b or .... | |
Returns: | Number |
Part of Library: | Math |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Math.max]Math.max [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Prints the largest value which math.max was given |
---|---|
Used on | |
Code | print(math.max(1, 2)) |
Output | 2 |
Additional Notes
- Accepts more than two values.
- Math.Max is an alias of this function that exists for backwards compatibility.