Function line_vector

Source
fn line_vector(
    p1: Point<F26Dot6>,
    p2: Point<F26Dot6>,
    is_parallel: bool,
) -> Point<i32>
Expand description

Computes a parallel or perpendicular normalized vector for the line between the two given points.

This is common code for the “set vector to line” instructions.

See https://gitlab.freedesktop.org/freetype/freetype/-/blob/57617782464411201ce7bbc93b086c1b4d7d84a5/src/truetype/ttinterp.c#L4009