<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/linear-interpolation-functions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Linear interpolation functions"
}
-->

# Linear interpolation functions

Compute the linear average between two vectors or between the neighboring elements in one vector.

## Topics

### Vector-to-Vector Linear Interpolation

[`static func linearInterpolate<T, U>(T, U, using: Double) -> [Double]`](/documentation/Accelerate/vDSP/linearInterpolate(_:_:using:)-3j5d2)

Returns the linear interpolation between the supplied double-precision vectors.

[`static func linearInterpolate<T, U>(T, U, using: Float) -> [Float]`](/documentation/Accelerate/vDSP/linearInterpolate(_:_:using:)-71as1)

Returns the linear interpolation between the supplied single-precision vectors.

[`static func linearInterpolate<T, U, V>(T, U, using: Double, result: inout V)`](/documentation/Accelerate/vDSP/linearInterpolate(_:_:using:result:)-6o7a9)

Calculates the linear interpolation between the supplied double-precision vectors.

[`static func linearInterpolate<T, U, V>(T, U, using: Float, result: inout V)`](/documentation/Accelerate/vDSP/linearInterpolate(_:_:using:result:)-55avl)

Calculates the linear interpolation between the supplied single-precision vectors.

[`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);`](/documentation/Accelerate/vDSP_vintb)

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

[`extern void vDSP_vintbD(const double *__A, vDSP_Stride __IA, const double *__B, vDSP_Stride __IB, const double *__C, double *__D, vDSP_Stride __ID, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vintbD)

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

### Single-Vector Linear Interpolation

The functions in this group calculate the linear interpolation between neighboring elements.

  <doc://com.apple.accelerate/documentation/Accelerate/using-linear-interpolation-to-construct-new-data-points>

[`static func linearInterpolate<T, U>(elementsOf: T, using: U) -> [Double]`](/documentation/Accelerate/vDSP/linearInterpolate(elementsOf:using:)-5i3jc)

Returns the interpolation between the neighboring elements of a double-precision vector.

[`static func linearInterpolate<T, U>(elementsOf: T, using: U) -> [Float]`](/documentation/Accelerate/vDSP/linearInterpolate(elementsOf:using:)-49r3c)

Returns the interpolation between the neighboring elements of a single-precision vector.

[`static func linearInterpolate<T, U, V>(elementsOf: T, using: U, result: inout V)`](/documentation/Accelerate/vDSP/linearInterpolate(elementsOf:using:result:)-4n3lr)

Calculates the interpolation between the neighboring elements of a double-precision vector.

[`static func linearInterpolate<T, U, V>(elementsOf: T, using: U, result: inout V)`](/documentation/Accelerate/vDSP/linearInterpolate(elementsOf:using:result:)-9y61c)

Calculates the interpolation between the neighboring elements of a single-precision vector.

[`extern void vDSP_vlint(const float *__A, const float *__B, vDSP_Stride __IB, float *__C, vDSP_Stride __IC, vDSP_Length __N, vDSP_Length __M);`](/documentation/Accelerate/vDSP_vlint)

Calculates the interpolation between the neighboring elements of a single-precision vector using the specified stride.

[`extern void vDSP_vlintD(const double *__A, const double *__B, vDSP_Stride __IB, double *__C, vDSP_Stride __IC, vDSP_Length __N, vDSP_Length __M);`](/documentation/Accelerate/vDSP_vlintD)

Calculates the interpolation between the neighboring elements of a double-precision vector using the specified stride.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)