cheby 0.4.0

Unit-safe Chebyshev approximation and spectral numerics for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use qtty::{Kilometer, Second};

type Velocity = qtty::velocity::Velocity<qtty::unit::Kilometer, qtty::unit::Second>;

fn main() {
    let domain = cheby::Domain::new(Second::new(0.0), Second::new(10.0));
    let series = cheby::ChebySeriesOn::new(
        domain,
        cheby::ChebySeries::new([Velocity::new(2.0), Velocity::new(0.0)]),
    );
    let position: Kilometer = series
        .evaluate_integral_from_start(Second::new(3.0))
        .unwrap();
    println!("{}", position.value());
}