AutoMovie API
    Preparing search index...

    Variable segmentSphereConst

    segmentSphere: (
        a: IAutoMovieVector3,
        b: IAutoMovieVector3,
        c: IAutoMovieVector3,
        radius: number,
    ) => number | null = ...

    First intersection of the segment a→b with a sphere, as the parameter s ∈ [0, 1] where contact begins (a + s·(b−a)), or null if the segment never touches the sphere. If a already lies inside, returns 0.

    Solves |a + s·d − c|² = r² (a quadratic in s) and returns the entry root that falls within the segment. A degenerate segment (a == b) reduces to a point-in-sphere test.

    Type Declaration