Skip to content

Instantly share code, notes, and snippets.

@heapwolf
Created July 19, 2012 23:01
Show Gist options
  • Save heapwolf/3147465 to your computer and use it in GitHub Desktop.
Save heapwolf/3147465 to your computer and use it in GitHub Desktop.
modules/pi
var pi = Math.PI;
function diameter(radius) {
return2 * radius;
}
function circumference(radius) {
return pi * diameter(radius);
}
function area(radius) {
return pi * Math.pow(radius, 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment