Created
June 14, 2017 00:18
-
-
Save Daniel-Hug/d31ef6b27053563d3c8e1cb79da94a2f to your computer and use it in GitHub Desktop.
JS function: get area of circle from diameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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