---
title: "GLKVector4Lerp(_:_:_:)"
framework: GLKit
role: symbol
role_heading: Function
platforms: [iOS 5.0+, iPadOS 5.0+, macOS 10.8+, tvOS 9.0+]
path: "glkit/glkvector4lerp(_:_:_:)"
---

# GLKVector4Lerp(_:_:_:)

Returns a new vector created by linearly interpreting between two vectors.

## Declaration

```swift
func GLKVector4Lerp(_ vectorStart: GLKVector4, _ vectorEnd: GLKVector4, _ t: Float) -> GLKVector4
```

## Parameters

- `vectorStart`: The starting vector.
- `vectorEnd`: The ending vector.
- `t`: An interpolation constant.

## Return Value

Return Value A new vector.

## Discussion

Discussion The value of t should typically be between 0.0 and 1.0. A value of 0.0 returns the starting vector and a value of 1.0 returns the ending vector. Any other value of t results in a linear interpolation between the two points.

## See Also

### Mathematical Operations Performed on Vectors

- [GLKVector4Negate(_:)](glkit/glkvector4negate(_:).md)
- [GLKVector4Normalize(_:)](glkit/glkvector4normalize(_:).md)
- [GLKVector4AddScalar(_:_:)](glkit/glkvector4addscalar(_:_:).md)
- [GLKVector4SubtractScalar(_:_:)](glkit/glkvector4subtractscalar(_:_:).md)
- [GLKVector4MultiplyScalar(_:_:)](glkit/glkvector4multiplyscalar(_:_:).md)
- [GLKVector4DivideScalar(_:_:)](glkit/glkvector4dividescalar(_:_:).md)
- [GLKVector4Add(_:_:)](glkit/glkvector4add(_:_:).md)
- [GLKVector4Subtract(_:_:)](glkit/glkvector4subtract(_:_:).md)
- [GLKVector4Multiply(_:_:)](glkit/glkvector4multiply(_:_:).md)
- [GLKVector4Divide(_:_:)](glkit/glkvector4divide(_:_:).md)
- [GLKVector4DotProduct(_:_:)](glkit/glkvector4dotproduct(_:_:).md)
- [GLKVector4CrossProduct(_:_:)](glkit/glkvector4crossproduct(_:_:).md)
- [GLKVector4Project(_:_:)](glkit/glkvector4project(_:_:).md)
- [GLKVector4Maximum(_:_:)](glkit/glkvector4maximum(_:_:).md)
- [GLKVector4Minimum(_:_:)](glkit/glkvector4minimum(_:_:).md)
