pub fn linear<T: Float>(a: T, b: T, t: T) -> T
Expand description
Linear interpolation function using generics
This function performs linear interpolation between two points. It calculates the value at a specified point between the two given points.
§Type Parameters
T: Float
- The type of the input values. This should be a floating point type.
§Parameters
a: T
- The start point for interpolation.b: T
- The end point for interpolation.t: T
- The interpolation factor. Should be in the range [0, 1].
§Returns
T
- The interpolated value.