#[repr(C)]pub struct QuadraticSegment {
pub p0: Point,
pub p1: Point,
pub p2: Point,
}Expand description
A quadratic bezier curve segment in 2-dimensional Euclidian space.
Fields§
§p0: Point§p1: Point§p2: PointImplementations§
§impl QuadraticSegment
impl QuadraticSegment
pub fn new(p0: Point, p1: Point, p2: Point) -> QuadraticSegment
pub fn new(p0: Point, p1: Point, p2: Point) -> QuadraticSegment
Creates a new quadratic bezier curve segment with the given control points.
pub fn is_approximately_linear(self, epsilon: f64) -> bool
pub fn is_approximately_linear(self, epsilon: f64) -> bool
Returns true if self is approximately linear with tolerance epsilon.
pub fn split(self, t: f64) -> (QuadraticSegment, QuadraticSegment)
pub fn split(self, t: f64) -> (QuadraticSegment, QuadraticSegment)
Splits self into two quadratic Bezier curve segments, at parameter t.
Trait Implementations§
§impl Clone for QuadraticSegment
impl Clone for QuadraticSegment
§fn clone(&self) -> QuadraticSegment
fn clone(&self) -> QuadraticSegment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for QuadraticSegment
impl Debug for QuadraticSegment
§impl PartialEq<QuadraticSegment> for QuadraticSegment
impl PartialEq<QuadraticSegment> for QuadraticSegment
§fn eq(&self, other: &QuadraticSegment) -> bool
fn eq(&self, other: &QuadraticSegment) -> bool
This method tests for
self and other values to be equal, and is used
by ==.§impl Transform for QuadraticSegment
impl Transform for QuadraticSegment
fn transform<T>(self, t: &T) -> QuadraticSegmentwhere T: Transformation,
fn transform_mut<T>(&mut self, t: &T)where T: Transformation,
impl Copy for QuadraticSegment
impl StructuralPartialEq for QuadraticSegment
Auto Trait Implementations§
impl RefUnwindSafe for QuadraticSegment
impl Send for QuadraticSegment
impl Sync for QuadraticSegment
impl Unpin for QuadraticSegment
impl UnwindSafe for QuadraticSegment
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more