pub trait Kernel<T: CoordNum> {
// Provided methods
fn orient2d(p: Coord<T>, q: Coord<T>, r: Coord<T>) -> Orientation { ... }
fn square_euclidean_distance(p: Coord<T>, q: Coord<T>) -> T { ... }
fn dot_product_sign(u: Coord<T>, v: Coord<T>) -> Orientation { ... }
}
Expand description
Kernel trait to provide predicates to operate on different scalar types.
Provided Methods§
sourcefn orient2d(p: Coord<T>, q: Coord<T>, r: Coord<T>) -> Orientation
fn orient2d(p: Coord<T>, q: Coord<T>, r: Coord<T>) -> Orientation
Gives the orientation of 3 2-dimensional points: ccw, cw or collinear (None)
fn square_euclidean_distance(p: Coord<T>, q: Coord<T>) -> T
sourcefn dot_product_sign(u: Coord<T>, v: Coord<T>) -> Orientation
fn dot_product_sign(u: Coord<T>, v: Coord<T>) -> Orientation
Compute the sign of the dot product of u
and v
using
robust predicates. The output is CounterClockwise
if
the sign is positive, Clockwise
if negative, and
Collinear
if zero.
Object Safety§
This trait is not object safe.