[][src]Struct cubic_spline::SplineOpts

pub struct SplineOpts {
    pub disallow_x_stepping_back: bool,
    pub tension: f64,
    pub num_of_segments: u32,
}

Options for the spline

Fields

disallow_x_stepping_back: bool

If true checks that every x value of point is greater than previous

default is false

tension: f64

Tension

default is 0.5_f64

num_of_segments: u32

Number of calculated points between known points

default is 16_u32

Trait Implementations

impl Default for SplineOpts[src]

fn default() -> Self[src]

Example

let opts = SplineOpts {
  num_of_segments
  ..Default::default();
};

let points = vec![10.1, 300.6542, 77.32, 10.42, 375.2, -108.65];

let spline_points = Spline::from_flatten_points(&points, &opts);

Auto Trait Implementations

impl Send for SplineOpts

impl Sync for SplineOpts

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]