pub fn colinear_2d<S>(a: &Point2<S>, b: &Point2<S>, c: &Point2<S>) -> boolwhere
S: Field + RelativeEq,
Expand description
Returns true when three points lie on the same line in 2D space.
assert!(colinear_2d (
&[-1.0, -1.0].into(),
&[ 0.0, 0.0].into(),
&[ 1.0, 1.0].into())
);
assert!(!colinear_2d (
&[-1.0, -1.0].into(),
&[ 0.0, 1.0].into(),
&[ 1.0, -1.0].into())
);