Struct makepad_vector::geometry::quadratic_segment::QuadraticSegment
source · [−]Expand description
A quadratic bezier curve segment in 2-dimensional Euclidian space.
Fields
p0: Point
p1: Point
p2: Point
Implementations
sourceimpl QuadraticSegment
impl QuadraticSegment
sourcepub 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.
sourcepub 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
.
sourcepub 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
sourceimpl Clone for QuadraticSegment
impl Clone for QuadraticSegment
sourcefn clone(&self) -> QuadraticSegment
fn clone(&self) -> QuadraticSegment
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for QuadraticSegment
impl Debug for QuadraticSegment
sourceimpl PartialEq<QuadraticSegment> for QuadraticSegment
impl PartialEq<QuadraticSegment> for QuadraticSegment
sourcefn eq(&self, other: &QuadraticSegment) -> bool
fn eq(&self, other: &QuadraticSegment) -> bool
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more