autopdex.geometry.on_line

autopdex.geometry.on_line(x, x_p1, x_p2)[source]

Check if a point lies on a line segment defined by two points (jitted).

Parameters:
  • x (jnp.ndarray) – The point to be checked.

  • x_p1 (jnp.ndarray) – The starting point of the line segment.

  • x_p2 (jnp.ndarray) – The ending point of the line segment.

Returns:

True if the point lies on the line segment, False otherwise.

Return type:

bool