# How do I calculate a point between two points with a given distance percentage? [duplicate]

The distance between these two points is calculated with a simple formula:

Which gives: 5,38

I need to calculate the green point's coordinates, which is set at 80% distance from the B point towards the A point.

I could make a direction vector between A and B, and then, add (dir * 5.38 * 0.8) to the B point itself, but it gives me strange results.

Is there a simpler (and more efficient!) way to achieve that?