-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorganized and refactored odf actor
- Loading branch information
1 parent
ecca0f6
commit 8006581
Showing
2 changed files
with
36 additions
and
32 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
float coeffsNorm(float coef, float min, float max, float a, float b) | ||
float rescale(float x, float oldMin, float oldMax, float newMin, float newMax) | ||
{ | ||
return (coef - min) * ((b - a) / (max - min)) + a; | ||
} | ||
return (x - oldMin) * (newMax - newMin) / (oldMax - oldMin) + newMin; | ||
} |