Trait rtriangulate::Point [] [src]

pub trait Point<T> where
    T: FloatCore
{ fn x(&self) -> T;
fn y(&self) -> T; }

A trait for two-dimensional points.

This is the trait your point type needs to implement to be able to be passed to the triangulate function.

For your convenience, a sort_points function is provided. This function can be used in the sort_by or sort_unstable_by functions on slices, and will order the points in the order necessary for triangulate to work (which is in ascending x order).

Required Methods

Returns the x component of this point.

Returns the y component of this point.

Implementors