Hello!
I need to calculate the slope of a perpendicular line, which I can do on a piece of paper :
LineA’s slope = 1/3
PerpendicularToLineA’s slope = -3/1
(-Run/Rise)
But how do I do this programatically?
lineA.slope = 2;
perpLineA.slope = ???; (It would equal -1/2 in this case)
I cant find an actual formula anywhere and my line/linesegment classes do not contain rise’s/run’s only a numerical slope.
Any help is greatly appreciated!