class ThreeDViewer.Utils.FloatExtension¶
Overview¶
Class that contains all the extensions for the float class. More…
class FloatExtension { public: // methods static float Map(this float s, float a1, float a2, float b1, float b2); };
Detailed Documentation¶
Class that contains all the extensions for the float class.
Methods¶
static float Map(this float s, float a1, float a2, float b1, float b2)
Linearly maps the value s that’s in the range [a1, a2] to the range [b1, b2].
Parameters:
s |
The value to map. |
a1 |
The first limit of the range that s belongs to. |
a2 |
The second limit of the range that s belongs to. |
b1 |
The first limit of the ouput range. |
b2 |
The second limit of the ouput range. |
Returns:
The mapped value in the [b1, b2] range.