Contents

vDSP_vintb

Calculates the linear interpolation between the supplied single-precision vectors using the specified stride.

Declaration

extern void vDSP_vintb(const float *__A, vDSP_Stride __IA, const float *__B, vDSP_Stride __IB, const float *__C, float *__D, vDSP_Stride __ID, vDSP_Length __N);

Parameters

  • __A:

    Single-precision real input vector.

  • __IA:

    Stride for A.

  • __B:

    Single-precision real input vector.

  • __IB:

    Stride for B.

  • __C:

    Single-precision real input scalar: interpolation constant.

  • __D:

    Single-precision real output vector.

  • __ID:

    Stride for D.

  • __N:

    The number of elements to process.

Discussion

This function interpolates between the first N elements of A and B by taking the difference between corresponding elements, multiplying it by the constant C, and adding this to the corresponding element of A; results are left in corresponding elements of D:

[Image]

This example interpolates from a (all zeros) toward b [10, 20, 30, 40] using the interpolation constant 0.25, computing a + 0.25 · (b − a) elementwise. The result is one quarter of the way from a to b: [2.5, 5, 7.5, 10].

The following code shows an example of using this function:

See Also

Vector-to-Vector Linear Interpolation