Check if a line passes through the origin | JavaScript program to find if line passing through two coordinates also passes through origin or not ; Driver Code
function checkOrigin ( x1 , y1 , x2 , y2 ) { return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) ) ; } if ( checkOrigin ( 1 , 28 , 2 , 56 ) == true ) document . write ( " " ) ; else document . write ( " " ) ;