Skip to main content

vec3ProjectOnLine

Callable

  • vec3ProjectOnLine(p: Vec3, lineStart: Vec3, lineEnd: Vec3): number

  • Project point p onto the line defined by lineStartlineEnd. Returns the parameter t such that the projected point = lerp(lineStart, lineEnd, t). t is NOT clamped — values outside [0,1] are valid (point projects beyond segment).


    Parameters

    Returns number