Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Update Scale Algorithm #135

Merged
merged 1 commit into from
Sep 13, 2015
Merged

Conversation

taralloc
Copy link
Contributor

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.

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.
@cesarsouza cesarsouza merged commit aebb29a into accord-net:development Sep 13, 2015
@cesarsouza
Copy link
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!

@taralloc taralloc deleted the patch-1 branch September 13, 2015 11:27
cesarsouza added a commit that referenced this pull request Jan 5, 2016
… are equal, scaled values should remain unchanged.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants