Skip to content

Instantly share code, notes, and snippets.

@AlexsJones
Created July 20, 2012 13:55
Show Gist options
  • Select an option

  • Save AlexsJones/3150860 to your computer and use it in GitHub Desktop.

Select an option

Save AlexsJones/3150860 to your computer and use it in GitHub Desktop.
float normalise(int _inputsize,int range_min, int range_max,int _height_in_range)
{
int _intorange = _inputsize - range_min;
cout << "size into range " << _intorange << endl;
int size_of_range = range_max - range_min;
cout << "size of range " << size_of_range << endl;
float output = (_intorange / size_of_range);
cout << "output " << output << endl;
return output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment