pub trait ConstructionKernel {
// Required method
fn segment_intersection_2(
&self,
a: Point2,
b: Point2,
c: Point2,
d: Point2,
) -> Result<ExactPoint2, Unsupported>;
}Expand description
Optional exact-construction kernel trait.
Implementors provide exact coordinate construction (intersection points that
survive re-predication without sign drift). FilteredF64Kernel does NOT
implement this — it returns f64 approximations, not exact points.
ExactConstructionKernel does.
Required Methods§
Sourcefn segment_intersection_2(
&self,
a: Point2,
b: Point2,
c: Point2,
d: Point2,
) -> Result<ExactPoint2, Unsupported>
fn segment_intersection_2( &self, a: Point2, b: Point2, c: Point2, d: Point2, ) -> Result<ExactPoint2, Unsupported>
Exact 2-D segment-segment intersection point.
Returns the intersection of segment ab with segment cd as an exact
rational point (ExactPoint2), or Err(Unsupported) if the kernel
cannot construct exact points. Parallel / collinear segments return
Err(Unsupported::new("segment_intersection_2", "parallel or collinear")).