pub struct LinearEquation {
pub a: f64,
pub b: f64,
}Expand description
A linear equation of the form ax + b = 0.
Fields§
§a: f64The coefficient for x.
b: f64The constant term.
Implementations§
Source§impl LinearEquation
impl LinearEquation
Sourcepub const fn new(a: f64, b: f64) -> LinearEquation
pub const fn new(a: f64, b: f64) -> LinearEquation
Creates a linear equation of the form ax + b = 0.
Trait Implementations§
Source§impl Clone for LinearEquation
impl Clone for LinearEquation
Source§fn clone(&self) -> LinearEquation
fn clone(&self) -> LinearEquation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearEquation
impl Debug for LinearEquation
Source§impl PartialEq for LinearEquation
impl PartialEq for LinearEquation
Source§fn eq(&self, other: &LinearEquation) -> bool
fn eq(&self, other: &LinearEquation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl RootSolver for LinearEquation
impl RootSolver for LinearEquation
Source§fn solve(&self) -> <LinearEquation as RootSolver>::Output
fn solve(&self) -> <LinearEquation as RootSolver>::Output
Solves the equation and returns its concrete output.
impl Copy for LinearEquation
impl StructuralPartialEq for LinearEquation
Auto Trait Implementations§
impl Freeze for LinearEquation
impl RefUnwindSafe for LinearEquation
impl Send for LinearEquation
impl Sync for LinearEquation
impl Unpin for LinearEquation
impl UnsafeUnpin for LinearEquation
impl UnwindSafe for LinearEquation
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