TPG.GetRank(rating)📋 Has LDoc👁️ 0 viewsUpdated 1 month ago
Description
The rank entry for a rating value, and its index in TPG.Ranks. Rating defaults to 1000 (the ladder's centre, and every new player's starting rating) when not given. Walks the whole table keeping the LAST entry whose min the rating still clears, so it depends on TPG.Ranks staying sorted ascending by min; never returns nil since Ranks[1].min is 0 and every rating is >= 0.
Parameters
| Name | Type | Description |
|---|---|---|
rating? | number | (default: 1000) |
Returns
| Type | Description |
|---|---|
table | The matching rank entry. |
number | Its index in `TPG.Ranks`. |
Examples
No examples available.
Used In
No usages found in the codebase.