Skip to content

Instantly share code, notes, and snippets.

@brytebee
Created April 14, 2022 07:35
Show Gist options
  • Save brytebee/6b2ba5058987cfe4382c73ae39314684 to your computer and use it in GitHub Desktop.
Save brytebee/6b2ba5058987cfe4382c73ae39314684 to your computer and use it in GitHub Desktop.
It should calculate the area of a regular polygon inside a circle.
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