Skip to content

Instantly share code, notes, and snippets.

@allex
Created July 8, 2011 01:39
Show Gist options
  • Save allex/1070928 to your computer and use it in GitHub Desktop.
Save allex/1070928 to your computer and use it in GitHub Desktop.
calc specific disk space as integer
function disk(v) {
// var r = ((v - 1) * 1028) + 1024;
return Math.ceil(Math.ceil(v * 1024 / 7.84423828125) * 7.84423828125);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment