I need to draw a line at 90° to an existing line, I know the 2 points of the line and that the new line should be the same length as the existing (essentially a 45-45-90 triangle) How do I work this out in a JavaScript context?
I know the coordinates of A and B, then length of a (and b as it is the same as a) and need to find C I know there is going to be 2 different place this point could be, but for my purpose it does not matter which, as long as it makes a valid 45-45-90 from the base line.
for example: A=5,2 B=3,7, what is C?
For the life of me I cannot remember the trigonometry I learned in high school (this is the first time I have needed it, 15 years later) and all of the math sites I have visited have just confused me more. most assume you want to know the length of the long side.