-
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
f2204f0
commit 2ee1422
Showing
3 changed files
with
39 additions
and
35 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
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; | ||
} |