calculateExperienceProgress
Calculate the progress towards the next level based on current experience.
Method calculateExperienceProgress
Parameters:
level
(number): The current level.experience
(number): The current experience points.
Returns:
object
: Object containing progress in fractional and whole values.fractional
(object):progress
(number): Progress towards the next level as a percentage (float).remaining
(number): Remaining progress towards the next level as a percentage (float).
whole
(object):progress
(number): Rounded down progress towards the next level as a percentage (integer).remaining
(number): Rounded down remaining progress towards the next level as a percentage (integer).
Example Usage:
This method calculates the progress towards the next level based on the provided current level, current experience, base experience, and experience multiplier within the LevelAlgorithm
instance. It returns progress values as both floating-point and integer percentages.
Last updated