Ratio of the distance between the centers of the circles and the point of intersection of two direct common tangents to the circles | Function to find the GCD ; Function to find the ratio ; Driver code
< ? php function GCD ( $ a , $ b ) { return ( $ b != 0 ? GCD ( $ b , $ a % $ b ) : $ a ) ; } function ratiotang ( $ r1 , $ r2 ) { echo " The ▁ ratio ▁ is ▁ " , $ r1 / GCD ( $ r1 , $ r2 ) , " ▁ : ▁ " , $ r2 / GCD ( $ r1 , $ r2 ) ; } $ r1 = 4 ; $ r2 = 6 ; ratiotang ( $ r1 , $ r2 ) ; ? >