Skip to content

Instantly share code, notes, and snippets.

@Daniel-Hug
Created June 14, 2017 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Daniel-Hug/d31ef6b27053563d3c8e1cb79da94a2f to your computer and use it in GitHub Desktop.
Save Daniel-Hug/d31ef6b27053563d3c8e1cb79da94a2f to your computer and use it in GitHub Desktop.
JS function: get area of circle from diameter
function getCircleArea(diameter) {
return diameter * diameter * Math.pi / 4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment