pub struct Lnc { /* private fields */ }Expand description
A point of type Lnc, computed from p, q and t:
x = q.x + t * (p.x - q.x)
y = q.y + t * (p.y - q.y)
z = q.z + t * (p.z - q.z)
where 0 <= t, t <= 1The constructors compute the coordinates in f64 with a bound on the error
of each one, Point::approx and Point::err; Point::exact computes
them exactly.
Implementations§
Source§impl Lnc
impl Lnc
Sourcepub fn new(p: [f64; 3], q: [f64; 3], t: f64) -> Result<Self, PointError>
pub fn new(p: [f64; 3], q: [f64; 3], t: f64) -> Result<Self, PointError>
The point of type Lnc with the parameters p, q and t.
§Errors
PointError::NonFinite if an input is NaN or infinite, and
PointError::ParamOutOfRange if the parameters do not satisfy the
conditions of the type.
Sourcepub fn new_unchecked(p: [f64; 3], q: [f64; 3], t: f64) -> Self
pub fn new_unchecked(p: [f64; 3], q: [f64; 3], t: f64) -> Self
The point of type Lnc with the parameters p, q and t, without
checking them: any f64 is accepted. A coordinate whose approximation or
error bound is not finite gets an error of +∞, and Point::exact
fails with ExactError::OutOfRange when an input is not finite.
Trait Implementations§
impl Copy for Lnc
Source§impl Point for Lnc
impl Point for Lnc
Source§fn is_explicit(&self) -> bool
fn is_explicit(&self) -> bool
Whether the point is explicit. It may return
true only if
approx holds the exact coordinates, every
err is zero and exact gives
Weight::One; returning false is always allowed. A wrong true
makes the predicates return wrong signs, unchecked.Source§fn exact(&self, scratch: &mut Scratch<'_>) -> Result<ExactCoords, ExactError>
fn exact(&self, scratch: &mut Scratch<'_>) -> Result<ExactCoords, ExactError>
impl StructuralPartialEq for Lnc
Auto Trait Implementations§
impl Forget for Lnc
impl Freeze for Lnc
impl Move for Lnc
impl RefUnwindSafe for Lnc
impl Send for Lnc
impl Sync for Lnc
impl Unpin for Lnc
impl UnsafeUnpin for Lnc
impl UnwindSafe for Lnc
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