Function colinear_3d

Source
pub fn colinear_3d<S>(a: &Point3<S>, b: &Point3<S>, c: &Point3<S>) -> bool
where S: Field + Sqrt + RelativeEq,
Expand description

Returns true when three points lie on the same line in 3D space.

assert!(colinear_3d (
  &[-1.0, -1.0, -1.0].into(),
  &[ 0.0,  0.0,  0.0].into(),
  &[ 1.0,  1.0,  1.0].into())
);