The following PHP code computes the area of a segment of a circle given its radius and central angle:
main.php377 chars12 lines
To use this function, simply provide the radius r
and the central angle theta
in degrees:
main.php128 chars5 lines
This will output:
main.php32 chars2 lines
gistlibby LogSnag