i_curve 0.1.2

Boolean operations on closed paths of lines, Bezier curves, and rational elliptic arcs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::int::CurveInt;
use crate::kernel::int::curve::chord::{Chord, SegmentChord};
use i_overlay::i_shape::int::IntPoint;

#[derive(Debug, Clone, Copy, Default)]
pub(crate) struct QuadSegment<I: CurveInt> {
    pub(crate) control_points: [IntPoint<I>; 3],
}

impl<I: CurveInt> Chord<I> for QuadSegment<I> {
    #[inline]
    fn chord(&self) -> SegmentChord<I> {
        SegmentChord {
            a: self.control_points[0],
            b: self.control_points[2],
        }
    }
}