Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change normalize to use floor and ceil formula #47

Merged
merged 1 commit into from
Feb 10, 2016
Merged

Conversation

sidred
Copy link
Contributor

@sidred sidred commented Feb 10, 2016

Change normalize function to use floor and ceil based formula without loops. This is faster than using modulo operator and as fast as the existing while loop based solution. No slowdown for large numbers unlike while loop based solution.

Closes #46

@Ogeon
Copy link
Owner

Ogeon commented Feb 10, 2016

Nice, and thank you for adding some thorough tests!

@homu r+

@homu
Copy link
Contributor

homu commented Feb 10, 2016

📌 Commit d5abcc7 has been approved by Ogeon

@homu
Copy link
Contributor

homu commented Feb 10, 2016

⚡ Test exempted - status

@homu homu merged commit d5abcc7 into Ogeon:master Feb 10, 2016
homu added a commit that referenced this pull request Feb 10, 2016
Change normalize to use floor and ceil formula

Change normalize function to use floor and ceil based formula without loops. This is faster than using modulo operator and as fast as the existing while loop based solution. No slowdown for large numbers unlike while loop based solution.

Closes #46
@sidred sidred deleted the norm_fn branch February 10, 2016 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants