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.
Parameters
value: number
The value to determine the percentage of.
min: number
The minimum value.
Optionalmax: number
The maximum value.
OptionalupperMax: number
The mid-way point in the range that represents 100%.
Work out what percentage
valueis of the range betweenminandmax. Ifmaxisn't given then it will return the percentage ofvaluetomin.You can optionally specify an
upperMaxvalue, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.