Created
April 14, 2022 07:35
-
-
Save brytebee/6b2ba5058987cfe4382c73ae39314684 to your computer and use it in GitHub Desktop.
It should calculate the area of a regular polygon inside a circle.
This file contains hidden or 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
const areaOfPolygonInsideCircle = (r, n) => r * Math.cos(Math.PI/n).toFixed(3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment