Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle | Java Program to find the biggest Reuleaux triangle inscribed within in a square which in turn is inscribed within a circle ; Function to find the biggest reuleaux triangle ; the height or base or hypotenuse cannot be negative ; height of the reuleaux triangle ; area of the reuleaux triangle ; Driver code
import java . util . * ; import java . text . DecimalFormat ; class GFG { static double Area ( double l , double b , double h ) { if ( l < 0 b < 0 h < 0 ) return - 1 ; double x = ( l * b ) / ( l + b ) ; double A = 0.70477 * Math . pow ( x , 2 ) ; return A ; } public static void main ( String args [ ] ) { double l = 5 , b = 12 , h = 13 ; DecimalFormat df = new DecimalFormat ( " # , # # # , # #0.00000" ) ; System . out . println ( df . format ( Area ( l , b , h ) ) ) ; } }