Biggest Reuleaux Triangle inscirbed within a square inscribed in a semicircle | Function to find the biggest reuleaux triangle ; radius cannot be negative ; height of the reuleaux triangle ; area of the reuleaux triangle ; Driver code
< ? php function Area ( $ r ) { if ( $ r < 0 ) return -1 ; $ x = ( 2 * $ r ) / sqrt ( 5 ) ; $ A = 0.70477 * pow ( $ x , 2 ) ; return $ A ; } $ r = 5 ; echo Area ( $ r ) ; ? >