Program to check if three points are collinear | * function to check if point collinear or not ; Driver Code
function cool_line ( x1 , y1 , x2 , y2 , x3 , y3 ) { if ( ( y3 - y2 ) * ( x2 - x1 ) == ( y2 - y1 ) * ( x3 - x2 ) ) document . write ( " " ) ; else document . write ( " " ) ; } var a1 = 1 , a2 = 1 , a3 = 0 , b1 = 1 , b2 = 6 , b3 = 9 ; cool_line ( a1 , b1 , a2 , b2 , a3 , b3 ) ;