pub struct Quadratic {
pub c0: f64,
pub c1: f64,
pub c2: f64,
}Fields§
§c0: f64§c1: f64§c2: f64Implementations§
Source§impl Quadratic
impl Quadratic
pub fn eval(&self, x: f64) -> f64
pub fn is_finite(&self) -> bool
pub fn roots(&self) -> ArrayVec<f64, 2>
pub fn positive_discriminant_roots(&self) -> Option<(f64, f64)>
pub fn positive_discriminant_roots_no_overflow_check( &self, ) -> Option<(f64, f64)>
pub fn positive_discriminant_roots_no_overflow_check_half_b( &self, ) -> Option<(f64, f64)>
Trait Implementations§
impl Copy for Quadratic
impl StructuralPartialEq for Quadratic
Auto Trait Implementations§
impl Freeze for Quadratic
impl RefUnwindSafe for Quadratic
impl Send for Quadratic
impl Sync for Quadratic
impl Unpin for Quadratic
impl UnwindSafe for Quadratic
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