- Home /
How can I find the position between Point A and Point B, X units away from Point A?
How can I find the position on the vector between Point A and Point B, X units away from Point A where the distance between the points is at least X? Thanks
Comment
Best Answer
Answer by Jesse Anders · Oct 15, 2010 at 04:42 AM
Pseudocode:
C = A + normalize(B - A) * X
Note that this will work for any (reasonable) value of X; the only requirement is that A and B are not coincident or nearly coincident.
Great, I run that after I test that A and B are at least X apart. X is greater than zero and that works. Thank you.
Your answer
Follow this Question
Related Questions
Angle between 2 vectors/points on a local axis 1 Answer
Find center between 4 points 3 Answers
Closest point on multiple lines? 2 Answers
Floating point accuracy weirdness 4 Answers