pub struct LineHit { /* private fields */ }Expand description
A point where a line meets a circle, held exactly.
Implementations§
Source§impl LineHit
impl LineHit
Sourcepub fn cmp_param(self, value: f64) -> Result<Sign, ExactError>
pub fn cmp_param(self, value: f64) -> Result<Sign, ExactError>
Sign of t - value: whether this hit comes before (Negative),
at, or after the line parameter value. With 0.0 and 1.0 this
answers “is the hit inside the segment from..to”.
Sourcepub fn orientation(self, a: Point2, b: Point2) -> Result<Sign, ExactError>
pub fn orientation(self, a: Point2, b: Point2) -> Result<Sign, ExactError>
Which side of the directed line a -> b this hit lies on.
Sourcepub fn approx_param(self) -> f64
pub fn approx_param(self) -> f64
The parameter rounded to f64, for output only.
Never use this to make a decision; ask a sign question instead.
Sourcepub fn approx_point(self) -> Point2
pub fn approx_point(self) -> Point2
The point rounded to f64, for output only.
Trait Implementations§
impl Copy for LineHit
impl StructuralPartialEq for LineHit
Auto Trait Implementations§
impl Freeze for LineHit
impl RefUnwindSafe for LineHit
impl Send for LineHit
impl Sync for LineHit
impl Unpin for LineHit
impl UnwindSafe for LineHit
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