Type Definition fenris_geometry::Line2d
source · pub type Line2d<T> = Line<T, U2>;
Implementations§
source§impl<T> Line2d<T>where
T: Real,
impl<T> Line2d<T>where
T: Real,
pub fn intersect(&self, other: &Line2d<T>) -> Option<Point2<T>>
sourcepub fn intersect_line_parametric(&self, other: &Line2d<T>) -> Option<(T, T)>
pub fn intersect_line_parametric(&self, other: &Line2d<T>) -> Option<(T, T)>
Computes the intersection of two lines, if any.
Let all points on each line segment be defined by the relation x1 = a1 + t1 * d1
for 0 <= t1 <= 1
, and similarly for t2
. Here, t1
is the parameter associated with
self
, and t2
is the parameter associated with other
.