Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse | Java Program to find the biggest Reuleaux triangle inscribed within in a square which in turn is inscribed within an ellipse ; Function to find the biggest reuleaux triangle ; length of the axes cannot be negative ; height of the reuleaux triangle ; area of the reuleaux triangle ; Driver code
import java . io . * ; class GFG { static float Area ( float a , float b ) { if ( a < 0 && b < 0 ) return - 1 ; float h = ( float ) Math . sqrt ( ( ( Math . pow ( a , 2 ) + Math . pow ( b , 2 ) ) / ( Math . pow ( a , 2 ) * Math . pow ( b , 2 ) ) ) ) ; float A = ( float ) ( 0.70477 * Math . pow ( h , 2 ) ) ; return A ; } public static void main ( String [ ] args ) { float a = 5 , b = 4 ; System . out . println ( Area ( a , b ) ) ; } }