Sum of sides of largest and smallest child polygons possible from a given polygon | Function to find the sum of largest and smallest secondary polygons if possible ; Count edges of primary polygon ; Calculate edges present in the largest secondary polygon ; Given Exterior Angle
function secondary_polygon ( Angle ) { var edges_primary = 360 / Angle ; if ( edges_primary >= 6 ) { var edges_max_secondary = edges_primary / 2 ; document . write ( edges_max_secondary + 3 ) ; } else document . write ( " " ) ; } var Angle = 45 ; secondary_polygon ( Angle ) ;