Getting a percentage of a Float or Integer

I realize this isn’t directly in the scope of what the OP was asking, but this is the top search result from Google, so I wanted to share how to compare a number as a percentage of another number and have this converted to a 0-1 range. This can be helpful if you’re trying to fill a progress bar for example.

Let’s imagine you have two numbers, a value representing the current progress (maybe your XP), and another representing the target (When you gain a level). You would divide the Current Progress by the Target to get its percentage of the target on a 0-1 scale.

CompareNumbersAsPercentage

This will work regardless of the values and is a great way to convert to a 0-1 range to fill a progress meter. If you want the percentage on a 0 - 100 scale, just multiply the result by 100.