Created
August 12, 2013 22:49
-
-
Save cbronazc/6216080 to your computer and use it in GitHub Desktop.
Calculate Innings Pitched with Javascript
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
base = Math.floor(total); | |
partial = Math.round((total - base) * 10); | |
total = (base + Math.floor(partial / 3) + (partial % 3) / 10).toFixed(1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment