Ratio of the distance between the centers of the circles and the point of intersection of two transverse common tangents to the circles | javascript program to find the ratio of the distance between the centres of the circles and the povar of intersection of two transverse common tangents to the circles which do not touch each other ; Function to find the ratio ; Driver code
function GCD ( a , b ) { return ( b != 0 ? GCD ( b , a % b ) : a ) ; } function ratiotang ( r1 , r2 ) { document . write ( " " + r1 / GCD ( r1 , r2 ) + " " + r2 / GCD ( r1 , r2 ) ) ; } var r1 = 4 , r2 = 8 ; ratiotang ( r1 , r2 ) ;