GLKVector2Lerp(_:_:_:)
Returns a new vector created by linearly interpreting between two vectors.
Declaration
func GLKVector2Lerp(_ vectorStart: GLKVector2, _ vectorEnd: GLKVector2, _ t: Float) -> GLKVector2Parameters
- 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
GLKVector2Negate(_:)GLKVector2Normalize(_:)GLKVector2AddScalar(_:_:)GLKVector2SubtractScalar(_:_:)GLKVector2MultiplyScalar(_:_:)GLKVector2DivideScalar(_:_:)GLKVector2Add(_:_:)GLKVector2Subtract(_:_:)GLKVector2Multiply(_:_:)GLKVector2Divide(_:_:)GLKVector2DotProduct(_:_:)GLKVector2Project(_:_:)GLKVector2Maximum(_:_:)GLKVector2Minimum(_:_:)