Find two vertices of an isosceles triangle in which there is rectangle with opposite corners ( 0 , 0 ) and ( X , Y ) | Function to find two vertices of an isosceles triangle in which there is rectangle with opposite side ( 0 , 0 ) and ( x , y ) ; Required value ; ; print x1 and y1 ; print x2 and y3 ; Driver code ; Function call
function Vertices ( x , y ) { let val = Math . abs ( x ) + Math . abs ( y ) ; document . write ( val * ( x < 0 ? - 1 : 1 ) + " " ) ; document . write ( " " + val * ( y < 0 ? - 1 : 1 ) ) ; } let x = 3 , y = 3 ; Vertices ( x , y ) ;