use crate::numeric::scalar::Scalar;
pub trait Kernel2 {
type FT: Scalar;
type Point2;
type Segment2;
type Vector2;
fn orient2d(a: &Self::Point2, b: &Self::Point2, c: &Self::Point2) -> Self::FT;
fn are_equal2(a: &Self::Point2, b: &Self::Point2) -> bool;
fn are_collinear2(a: &Self::Point2, b: &Self::Point2, c: &Self::Point2) -> bool;
fn is_point_on_segment2(p: &Self::Point2, s: &Self::Segment2) -> bool;
fn point_u_on_segment2(
a: &Self::Point2,
b: &Self::Point2,
p: &Self::Point2,
) -> Option<Self::FT>;
}
pub trait Kernel3 {
type FT: Scalar;
type Point3;
type Segment3;
type Vector3;
fn orient3d(a: &Self::Point3, b: &Self::Point3, c: &Self::Point3, d: &Self::Point3)
-> Self::FT;
fn are_equal3(a: &Self::Point3, b: &Self::Point3) -> bool;
fn are_collinear3(a: &Self::Point3, b: &Self::Point3, c: &Self::Point3) -> bool;
fn is_point_on_segment3(p: &Self::Point3, s: &Self::Segment3) -> bool;
fn point_u_on_segment3(
a: &Self::Point3,
b: &Self::Point3,
p: &Self::Point3,
) -> Option<Self::FT>;
}