Struct lyon_geom::LineEquation
source · pub struct LineEquation<S> { /* private fields */ }
Expand description
A line defined by the equation
a * x + b * y + c = 0; a * a + b * b = 1
.
Implementations§
source§impl<S: Scalar> LineEquation<S>
impl<S: Scalar> LineEquation<S>
pub fn new(a: S, b: S, c: S) -> Self
pub fn a(&self) -> S
pub fn b(&self) -> S
pub fn c(&self) -> S
pub fn project_point(&self, p: &Point<S>) -> Point<S>
pub fn signed_distance_to_point(&self, p: &Point<S>) -> S
pub fn distance_to_point(&self, p: &Point<S>) -> S
pub fn invert(&self) -> Self
pub fn parallel_line(&self, p: &Point<S>) -> Self
pub fn offset(&self, d: S) -> Self
pub fn tangent(&self) -> Vector<S>
pub fn normal(&self) -> Vector<S>
pub fn solve_y_for_x(&self, x: S) -> Option<S>
pub fn solve_x_for_y(&self, y: S) -> Option<S>
pub fn is_horizontal(&self) -> bool
pub fn is_vertical(&self) -> bool
Trait Implementations§
source§impl<S: Clone> Clone for LineEquation<S>
impl<S: Clone> Clone for LineEquation<S>
source§fn clone(&self) -> LineEquation<S>
fn clone(&self) -> LineEquation<S>
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 moresource§impl<S: Debug> Debug for LineEquation<S>
impl<S: Debug> Debug for LineEquation<S>
source§impl<S: PartialEq> PartialEq for LineEquation<S>
impl<S: PartialEq> PartialEq for LineEquation<S>
impl<S: Copy> Copy for LineEquation<S>
impl<S: Eq> Eq for LineEquation<S>
impl<S> StructuralPartialEq for LineEquation<S>
Auto Trait Implementations§
impl<S> Freeze for LineEquation<S>where
S: Freeze,
impl<S> RefUnwindSafe for LineEquation<S>where
S: RefUnwindSafe,
impl<S> Send for LineEquation<S>where
S: Send,
impl<S> Sync for LineEquation<S>where
S: Sync,
impl<S> Unpin for LineEquation<S>where
S: Unpin,
impl<S> UnwindSafe for LineEquation<S>where
S: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)