|
static |
Gets the function value for the given argument value using the "Uniform Rational Quantization (URQ)" function [Schlick 95], whereby returned function values are always between 0 and 1 if the given value is between min and max .
The parameters min and max control the mapped argument interval of the function. Usually, min is 0, to shift the argument interval, a value greater than 0 can be specified.
If the urq parameter is equal to 1, it becomes a linear function. If it is greater than 1, e.g. 10, the function approximates a square root arc; and if it is lesser than 1, e.g. 0.1, a quadratic function is approximated. Note, the parameter urq should always be greater than 0.
If urq or value is 0 and max minus min is 0, then this function would divide by zero, and therefore, float.PositiveInfinity is returned.
min | Specifies the minimum of the URQ function argument interval. |
max | Specifies the maximum of the URQ function argument interval. |
value | The argument value to be mapped. |
urq | The URQ parameter to control the function shape. |