Skip to content

Instantly share code, notes, and snippets.

@raganmd
Last active May 21, 2020 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raganmd/b9354e51c27949013ef3317db584ae0c to your computer and use it in GitHub Desktop.
Save raganmd/b9354e51c27949013ef3317db584ae0c to your computer and use it in GitHub Desktop.
float remap(float value, float inMin, float inMax, float outMin, float outMax){
return (outMax - outMin) * (value - inMin) / (inMax - outMin) + newMin;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment