pub struct Conic { /* private fields */ }Expand description
A x^2 + B xy + C y^2 + D x + E y + F = 0, coefficients exact.
Implementations§
Source§impl Conic
impl Conic
Sourcepub fn from_coefficients(coeffs: [f64; 6]) -> Result<Self, ExactError>
pub fn from_coefficients(coeffs: [f64; 6]) -> Result<Self, ExactError>
From the six coefficients [A, B, C, D, E, F].
Refuses non-finite input, and a quadratic part that is identically zero (that is a line; use the line APIs).
Sourcepub fn circle(centre: Point2, radius: f64) -> Result<Self, ExactError>
pub fn circle(centre: Point2, radius: f64) -> Result<Self, ExactError>
The circle about centre with radius > 0.
Sourcepub fn ellipse(
centre: Point2,
axis: Point2,
a: f64,
b: f64,
) -> Result<Self, ExactError>
pub fn ellipse( centre: Point2, axis: Point2, a: f64, b: f64, ) -> Result<Self, ExactError>
The ellipse about centre with semi-axis a along axis and b
across it. axis need not be unit length: the implicit form is
scaled by |axis|^2, so no square root or division is needed.
Sourcepub fn coefficients(&self) -> &[Dyadic; 6]
pub fn coefficients(&self) -> &[Dyadic; 6]
The coefficients [A, B, C, D, E, F].
Trait Implementations§
impl Eq for Conic
impl StructuralPartialEq for Conic
Auto Trait Implementations§
impl Freeze for Conic
impl RefUnwindSafe for Conic
impl Send for Conic
impl Sync for Conic
impl Unpin for Conic
impl UnwindSafe for Conic
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