Skip to content

Instantly share code, notes, and snippets.

@benatwork
Created August 16, 2012 22:02
Show Gist options
  • Save benatwork/3374005 to your computer and use it in GitHub Desktop.
Save benatwork/3374005 to your computer and use it in GitHub Desktop.
Round to increment
function roundToIncrement(originalNumber,increment) {
return Math.round( originalNumber / increment ) * increment;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment