Method ConvertRange
ConvertRange(Single, Single, Single, Single, Single)
Converts the value from the old range to the new range while maintaining the same ratio of the value
Declaration
public static float ConvertRange(float value, float oldMin, float oldMax, float newMin, float newMax)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value to convert |
System.Single | oldMin | The minimum value of the old range |
System.Single | oldMax | The maximum value of the old range |
System.Single | newMin | The minimum value of the new range |
System.Single | newMax | The maximum value of the new range |
Returns
Type | Description |
---|---|
System.Single | The value converted into the new range |