Skip to content

Commit 2a9b258

Browse files
authored
Update polygon.js
1 parent 3b65d25 commit 2a9b258

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Geometry/polygon.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ class polygon{
1616
return this.sides*this.sidelength
1717
}
1818

19-
angle = () => {
19+
angle_deg = () => {
2020
return (180*(this.sides-2)/(this.sides))
2121
}
22+
23+
angle_rad = () => {
24+
return (Math.PI*(this.sides-2)/(this.sides))
25+
}
2226
}

0 commit comments

Comments
 (0)