pub struct Linear {
pub a: f64,
pub b: f64,
}
Expand description
A struct that contains the constants of an equation in the form ax + b. Some useful functions are also implemented.
Fields§
§a: f64
§b: f64
Implementations§
Trait Implementations§
Source§impl Polynomial for Linear
impl Polynomial for Linear
Source§type Derivative = f64
type Derivative = f64
The type returned by the derivative() function
Source§fn is_zero(&self) -> bool
fn is_zero(&self) -> bool
Returns true if the polynomial is a zero polynomial,
false otherwise
Source§fn derivative(&self) -> Self::Derivative
fn derivative(&self) -> Self::Derivative
Returns the derivative of the polynomial.
This derivative is returned in the form of another polynomial.
impl Copy for Linear
impl StructuralPartialEq for Linear
Auto Trait Implementations§
impl Freeze for Linear
impl RefUnwindSafe for Linear
impl Send for Linear
impl Sync for Linear
impl Unpin for Linear
impl UnwindSafe for Linear
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