Find the other end point of a line with given one end and mid | PHP function to find the end point of a line ; find end point for x coordinates ; find end point for y coordinates ; Driven Program
< ? php function otherEndPoint ( $ x1 , $ y1 , $ m1 , $ m2 ) { $ x2 = ( 2 * $ m1 - $ x1 ) ; $ y2 = ( 2 * $ m2 - $ y1 ) ; echo " x2 ▁ = ▁ " . $ x2 . " , ▁ y2 ▁ = ▁ " . $ y2 ; } $ x1 = -4 ; $ y1 = -1 ; $ m1 = 3 ; $ m2 = 5 ; otherEndPoint ( $ x1 , $ y1 , $ m1 , $ m2 ) ; ? >