The Wayback Machine - https://web.archive.org/web/20201103184932/https://github.com/TheAlgorithms/Java/pull/1100
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

Add class MillisBpmConverter #1100

Open
wants to merge 4 commits into
base: master
from

Conversation

@MatanDavidi
Copy link

@MatanDavidi MatanDavidi commented Oct 20, 2019

I added class MillisBpmConverter, that handles the conversion between units of measure for time intervals. These units of measure are Beats Per Minute (BPM) and the milliseconds between two beats (two quarter notes to be precise).
This class contains three methods:

  • int millisToBpm(long millis) which converts a time interval expressed in milliseconds to a time interval expressed in beats per minute.
  • long bpmToMillis(int bpm) which converts a time interval expressed in beats per minute to a time interval expressed in milliseconds.
  • void main(String[] args) which is used to start the program and contains an example of usage for the class.

Also I noticed and fixed an empty if statement inside class "Abecedarian". I know it's not my class, so if you want me to remove this "fix", please let me know.

MatanDavidi added 4 commits Oct 19, 2019
Update fork with latest commits of upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.