Skip to main content
gamedev.net
🔒 Locked

line intersection!

Started by pascalosti 1 reply 550+ views
Original Post
pascalosti
pascalosti
this is for line intersection 2d if m = slope y = m * x + b // what are you finding with these to equations? b = y1 - m * x1 // is it the distance from the x and y axis? I think i got it, y is where it intersects on m. but im still not sure what "b" will give?
HellRaiZer
HellRaiZer
'y' gives you the y-coord of the line that corresponds to the 'x' coordinate you pass to the function. See it as y(x) = m * x + b

'b' gives you the y-coord of the intersection between the line and the y-axis. This is because if you put x=0 in the above equation it gives : y(0) = b or b = y(x=0).

Hope that helps.

HellRaiZer
HellRaiZer
pascalosti
pascalosti
nevermind that ;-)

deleted my comment

[Edited by - pascalosti on August 16, 2006 9:22:52 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.