Appearance
DoCurious API Reference / types / calculateLevel
Function: calculateLevel()
calculateLevel(
xp):LevelDefinition
Defined in: types/gamification.types.ts:413
Determines the current LevelDefinition for a given cumulative XP total.
Parameters
xp
number
The user's total cumulative XP
Returns
The matching level definition (falls back to Level 1 for XP below 0)