Angle of intersection of two circles having their centers D distance apart | Function to find the cosine of the angle of the intersection of two circles with radius R1 and R2 ; Return the cosine of the angle ; Driver Code
def angle ( R1 , R2 , D ) : NEW_LINE INDENT ans = ( ( R1 * R1 + R2 * R2 - D * D ) / ( 2 * R1 * R2 ) ) NEW_LINE return ans NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT R1 = 3 NEW_LINE R2 = 4 NEW_LINE D = 5 NEW_LINE print ( angle ( R1 , R2 , D ) ) NEW_LINE DEDENT