Distance between two parallel lines | Function to find the distance between parallel lines ; Driver Code
function dist ( m , b1 , b2 ) { var d = Math . abs ( b2 - b1 ) / ( ( m * m ) - 1 ) ; return d ; } var m = 2 , b1 = 4 , b2 = 3 ; document . write ( dist ( m , b1 , b2 ) . toFixed ( 5 ) ) ;