Struct makepad_vector::geometry::LineSegment
source · [−]Expand description
A quadratic bezier curve segment in 2-dimensional Euclidian space.
Fields
p0: Point
p1: Point
Implementations
sourceimpl LineSegment
impl LineSegment
sourcepub fn new(p0: Point, p1: Point) -> LineSegment
pub fn new(p0: Point, p1: Point) -> LineSegment
Creates a new line segment with the given endpoints.
sourcepub fn compare_to_point(self, p: Point) -> Option<Ordering>
pub fn compare_to_point(self, p: Point) -> Option<Ordering>
Compares self
to the point p
.
Returns Ordering::Less
if self
lies below p
, Ordering::Greater
if self
lies
above p
, and Ordering::Equal
if self
is incident to p
.
sourcepub fn intersect_with_vertical_line(self, x: f64) -> Option<Point>
pub fn intersect_with_vertical_line(self, x: f64) -> Option<Point>
Returns the intersection point of the supporting line of self
with the vertical line
through x
, or None if these lines are coincident.
Trait Implementations
sourceimpl Clone for LineSegment
impl Clone for LineSegment
sourcefn clone(&self) -> LineSegment
fn clone(&self) -> LineSegment
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 LineSegment
impl Debug for LineSegment
sourceimpl PartialEq<LineSegment> for LineSegment
impl PartialEq<LineSegment> for LineSegment
sourcefn eq(&self, other: &LineSegment) -> bool
fn eq(&self, other: &LineSegment) -> bool
sourceimpl Transform for LineSegment
impl Transform for LineSegment
fn transform<T>(self, t: &T) -> LineSegmentwhere
T: Transformation,
fn transform_mut<T>(&mut self, t: &T)where
T: Transformation,
impl Copy for LineSegment
impl StructuralPartialEq for LineSegment
Auto Trait Implementations
impl RefUnwindSafe for LineSegment
impl Send for LineSegment
impl Sync for LineSegment
impl Unpin for LineSegment
impl UnwindSafe for LineSegment
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