This repository was archived by the owner on Nov 19, 2020. It is now read-only.
Update Scale Algorithm#135
Merged
cesarsouza merged 1 commit intoaccord-net:developmentfrom Sep 13, 2015
Merged
Conversation
If fromMin = fromMax, then no change should take place, and we should return the same values we received. Otherwise, a division by 0 occur that ultimately return all NaN values.
cesarsouza
added a commit
that referenced
this pull request
Sep 13, 2015
Correcting the algorithm of the Scale functions to avoid divisions by zero.
Member
|
Many thanks Francesco! It would be awesome if you could contribute some unit test cases as well! Otherwise I can try to add them at a later date. Thanks again! |
cesarsouza
added a commit
that referenced
this pull request
Jan 5, 2016
… are equal, scaled values should remain unchanged.
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If fromMin = fromMax, then no change should take place, and we should return the same values we received. Otherwise, a division by 0 occur that ultimately returns all NaN values.