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