Last active
January 13, 2019 04:48
-
-
Save TomoG29/323cdbd9ed9ed96131721154ed9eec55 to your computer and use it in GitHub Desktop.
This file contains 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 map(float value, float start1, float end1, float start2, float end2) | |
{ | |
return (start2 + (end2 - start2) * ((value - start1) / (end1 - start1))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment