GLKVector4Lerp(_:_:_:)
Returns a new vector created by linearly interpreting between two vectors.
Declaration
func GLKVector4Lerp(_ vectorStart: GLKVector4, _ vectorEnd: GLKVector4, _ t: Float) -> GLKVector4Parameters
- vectorStart:
The starting vector.
- vectorEnd:
The ending vector.
- t:
An interpolation constant.
Return Value
A new vector.
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(_:)GLKVector4Normalize(_:)GLKVector4AddScalar(_:_:)GLKVector4SubtractScalar(_:_:)GLKVector4MultiplyScalar(_:_:)GLKVector4DivideScalar(_:_:)GLKVector4Add(_:_:)GLKVector4Subtract(_:_:)GLKVector4Multiply(_:_:)GLKVector4Divide(_:_:)GLKVector4DotProduct(_:_:)GLKVector4CrossProduct(_:_:)GLKVector4Project(_:_:)GLKVector4Maximum(_:_:)GLKVector4Minimum(_:_:)