/// Returns the intersection of itself and a line segment, or `None` if it
/// doesn't exist.
Returns the intersection of itself and a line segment, or `None` if it
doesn't exist.
Returns the intersection of itself and a line segment or ` None ` if it doesn ' t exist .
pub fn intersect(&self, line: Segment<'_, T>) -> Option<Point<T>> {
        let d0 = self.distance(line.0);
        let d1 = self.distance(line.1);
        // This right here is some really sensitive code. If we screw up
        // handling the edge cases, cross-sections through elements will crash.
        (abs_diff_ne!(d0, d1, epsilon = T::EPS) && (d0 < -T::EPS) != (d1 < -T::EPS))
            .then(|| line.at(d1 / (d1 - d0)))
    }
pub fn intersect ( & self , line : Segment < ' _ , T > ) -> Option < Point < T > > { let d0 = self . distance ( line . 0 ) ; let d1 = self . distance ( line . 1 ) ; // This right here is some really sensitive code. If we screw up // handling the edge cases, cross-sections through elements will crash. ( abs_diff_ne ! ( d0 d1 epsilon T EPS ) && ( d0 < - T :: EPS ) != ( d1 < - T :: EPS ) ) . then ( | | line . at ( d1 / ( d1 - d0 ) ) ) }
Returns the intersection of itself and a line segment, or `None` if it
doesn't exist.
Returns the intersection of itself and a line segment or ` None ` if it doesn ' t exist .
&self
line
Segment<'_, T>