Skip to main content

segment_param

Function segment_param 

Source
pub fn segment_param<S: Real, const N: usize>(
    p: [S; N],
    a: [S; N],
    b: [S; N],
) -> S
Expand description

How far along the segment from a to b its point nearest p lies, from 0 at a to 1 at b. A segment with no length answers 0, its start.