Maximum angle in a regular n - gon is equal to the interior angle If the given angle is greater than the interior angle then the given angle cannot be created
if ( ( ang * n ) > ( 180 * ( n - 2 ) ) ) { return 0 ; }