Function tiny_skia_path::stroker::quad_in_line

source ยท
fn quad_in_line(quad: &[Point; 3]) -> bool
Expand description

Given quad, see if all there points are in a line. Return true if the inside point is close to a line connecting the outermost points.

Find the outermost point by looking for the largest difference in X or Y. Since the XOR of the indices is 3 (0 ^ 1 ^ 2) the missing index equals: outer_1 ^ outer_2 ^ 3.