Skip to content
Advertisement

Php code to see if two lines are parallel

I want to write a PHP code to see if two lines are parallel.

We have

JavaScript

But it’s not working correct even if given two parallel lines

Advertisement

Answer

The Slope is equal to m = (y2 - y1) / (x2 - x1)

I made some changes in your formula so it’s working I think.

JavaScript

it’s just a math problem

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement