How can I determine the number of sides of the polygon | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I determine the number of sides of the polygon

28th Feb 2020, 6:50 AM
Amos Uzuagie
2 Answers
+ 3
<svg height="210" width="500"> <polygon points="200,10 250,190 160,210" style="fill:lime;stroke:purple;stroke-width:1" /> </svg> 6 Entries in tag polygon attr. points. 6/2 = 3 therefore 3 sides
28th Feb 2020, 7:25 AM
Oma Falk
Oma Falk - avatar
+ 3
Martin Taylor didn't take into account that two points might be the same😉 good aspect.
28th Feb 2020, 11:23 AM
Oma Falk
Oma Falk - avatar