valentincognito
9/14/2017 - 2:26 AM

Values in percent of differents min and max

Get the value in percent of a value that have different boundaries

float value1inPercent = (((1 - Mathf.Abs((value1 - maxValue1) / (maxValue1 - minValue1))) * (maxValue2 - (minValue2))) - maxValue2);