Skip to main content

linear_weights

Function linear_weights 

Source
pub fn linear_weights<T>(x: T) -> (usize, usize, T)
where T: Float + FromPrimitive + Debug + AddAssign + DivAssign + 'static,
Expand description

Get the weights for linear interpolation

§Arguments

  • x - Position for interpolation

§Returns

  • (usize, usize, T) - (left index, right index, right weight)