pub fn find_leftmost_point(points: &ArrayView2<'_, f64>) -> usizeExpand description
Find the leftmost point in the point set
In case of ties (multiple points with the same x-coordinate), returns the first one encountered.
§Arguments
points- Input points array
§Returns
- Index of the leftmost point
§Examples
use scirs2_spatial::convex_hull::algorithms::jarvis_march::find_leftmost_point;
use scirs2_core::ndarray::array;
let points = array![[1.0, 0.0], [0.0, 1.0], [2.0, 0.0], [0.0, 0.0]];
let leftmost = find_leftmost_point(&points.view());
assert!(leftmost == 1 || leftmost == 3); // Either [0.0, 1.0] or [0.0, 0.0]