Skip to content

Instantly share code, notes, and snippets.

@HamptonMakes
Created December 7, 2013 22:07
Show Gist options
  • Select an option

  • Save HamptonMakes/7849723 to your computer and use it in GitHub Desktop.

Select an option

Save HamptonMakes/7849723 to your computer and use it in GitHub Desktop.
pi by the digits.
var piDigit = function(i) {
if(i == 0) {
i = -1;
}
return (Math.PI + "").substring(i+1,i+2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment