Function ptOnLine

Find the point that is located at dist r along a line between p1 and p2.

  • Parameters

    • p1: VecN

      start point of line segment

    • p2: VecN

      endpoint of line segment

    • r: Num

      distance from p1 to travel along the line

    Returns VecN

    vector representation of the point of intersection