-
Notifications
You must be signed in to change notification settings - Fork 1
melon.math
garryspins edited this page Feb 27, 2026
·
4 revisions
melon.math
Misc math functions
melon

melon.math.distance(x: number, y: number)
Argument and Return information
| # | Name | Type | Description |
|---|---|---|---|
| 1 | x | number | X Coordinate |
| 2 | y | number | Y Coordinate |
Gets the distance between x and y

melon.math.max(tbl: table, key?: any) -> number
Argument and Return information
| # | Name | Type | Description |
|---|---|---|---|
| 1 | tbl | table | Table to get the max of |
| 2 | key? | any | Check a specific key if valid, otherwise all, seems useless |
| # | Name | Type | Description |
|---|---|---|---|
| 1 | max | number | Max value from the table |
math.max on all table elements

melon.math.min(tbl: table, key?: any) -> number
Argument and Return information
| # | Name | Type | Description |
|---|---|---|---|
| 1 | tbl | table | Table to get the min of |
| 2 | key? | any | Check a specific key if valid, otherwise all, seems useless |
| # | Name | Type | Description |
|---|---|---|---|
| 1 | max | number | Min value from the table |
math.min on all table elements