Last active
August 28, 2020 19:39
-
-
Save theoknock/f21629dc845929a39730814024317ac6 to your computer and use it in GitHub Desktop.
Scales values within a given range to a value between 0 and 1 (normalization)
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
double (^normalize)(double, double, double) = ^double(double min, double max, double value) | |
{ | |
double result = (value - min) / (max - min); | |
return result; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment