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(); ```
| 11 | /// plot.show(); |
| 12 | /// ``` |
| 13 | pub struct Polynomial { |
| 14 | coefficients: Vec<f64>, |
| 15 | } |
| 16 | |
| 17 | impl Polynomial { |
| 18 | pub fn new(xs: &[f64], ys: &[f64]) -> Polynomial { |
nothing calls this directly
no outgoing calls
no test coverage detected