Function to find the cosine of the angle of the intersection of two circles with radius R1 and R2
float angle ( float R1 , float R2 , float D ) { float ans = ( R1 * R1 + R2 * R2 - D * D ) / ( 2 * R1 * R2 ) ;