Created
February 14, 2014 02:23
-
-
Save balaam/8994728 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static float LerpF( float value, float in0, float in1, float out0, float out1 ) | |
| { | |
| float normed = (value - in0) / (in1 - in0); | |
| float result = out0 + (normed * (out1 - out0)); | |
| return result; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment