Work out what percentage value
is of the range between min
and max
.
If max
isn't given then it will return the percentage of value
to min
.
You can optionally specify an upperMax
value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.
name | type | arguments | description |
---|---|---|---|
value | number |
The value to determine the percentage of. |
|
min | number |
The minimum value. |
|
max | number | <optional> |
The maximum value. |
upperMax | number | <optional> |
The mid-way point in the range that represents 100%. |
A value between 0 and 1 representing the percentage.