Function extrapolate_line_packed

Source
pub fn extrapolate_line_packed<P>(x0: P, x1: P, z: P) -> P
where P: PackedField,
Expand description

Extrapolates lines through a pair of packed fields at a packed vector of points.

Given two points (0, x0) and (1, x1), this function evaluates the line through these points at parameter z using the formula: x0 + (x1 - x0) * z

§Properties

  • When z = 0, returns x0
  • When z = 1, returns x1
  • The function is linear in z
  • Operates on packed field elements for SIMD efficiency

§Arguments

  • x0 - The y-coordinate at z = 0
  • x1 - The y-coordinate at z = 1
  • z - The evaluation point(s)

§Returns

The interpolated/extrapolated value(s) at point(s) z