w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Finding the intersection of two lines

What's wrong with using a little math?

If you have:

y = m1 x + b1
y = m2 x + b2

It's a simple system of linear equations.

If you solve them, your intersection is:

x = (b2 - b1)/(m1 - m2)
y = (m1 b2 - m2 b1)/(m1 - m2)




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.