point_on_line

Function point_on_line 

Source
pub fn point_on_line<P: GetXY, Q: GetXY>(
    line: &[P],
    point: &Q,
    eps: Option<f64>,
) -> bool
Expand description

Check to see if a point is on a line. Uses predicates to ensure the point is truly on the line

§Parameters

  • line: the line to check against
  • point: the point to check if it is on the line
  • epsilon: the buffer to use to check if the point is on the line within epsilon. Defaults to 0

§Returns

True if the point is on the line