I have 2 points, P and Q, on a directed line AB in 3D space. They can be anywhere on the line, i.e. not necessarily between A and B.
Pythagoras gives you the distance, obviously, but how do I calculate the sign of the directed distance from P to Q?
Take the dot product of AB and PQ. Positive => same direction, negative => opposite direction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With