Back to Adaptive Vision Library website
You are here: Start » Function Reference » Geometry 2D Interpolations » LerpVectors
Linearly interpolates between two vectors.
Syntax
C++
C#
void avl::LerpVectors ( const avl::Vector2D& inVector0, const avl::Vector2D& inVector1, const float inLambda, avl::Vector2D& outVector )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inVector0 | const Vector2D& | ||||
inVector1 | const Vector2D& | ||||
inLambda | const float | - - | 0.5f | Interpolation between the input vectors where 0.0 value is equal to inVector0 and 1.0 to inVector1 | |
outVector | Vector2D& |
Examples
Remarks
Please note that:
- interpolation begins at inVector0,
- for positive inLambda values interpolation is performed in the direction of inVector1 while for negative - in the direction of a vector which, when visualized with the same base point, ends in the point acquired by mirroring the head of inVector0 by a line perpendicular to the vector (inVector0 - inVector1).