Struct graplot::Polynomial
source · pub struct Polynomial { /* private fields */ }
Expand description
Use the Polynomial struct or polynomial() function to create a polynomial function that runs through all given points.
Example
use graplot::{x, Plot, Polynomial};
let poly = Polynomial::new(&[2., 3., 1.], &[2., 3., 2.]);
let plot = Plot::new((poly, x(10.)));
plot.show();
Implementations§
source§impl Polynomial
impl Polynomial
sourcepub fn new(xs: &[f64], ys: &[f64]) -> Polynomial
pub fn new(xs: &[f64], ys: &[f64]) -> Polynomial
Trait Implementations§
source§impl Clone for Polynomial
impl Clone for Polynomial
source§fn clone(&self) -> Polynomial
fn clone(&self) -> Polynomial
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more