Back to Adaptive Vision Library website
You are here: Start » Function Reference » Geometry 2D Interpolations » LerpVectors_Radial
Linearly interpolates between two radial vectors.
Header: | AVL.h |
---|
Syntax
C++
C#
void avl::LerpVectors_Radial ( const avl::Vector2D& inVector0, const avl::Vector2D& inVector1, atl::Optional<avl::RotationDirection::Type> inRotationDirection, const float inLambda, avl::Vector2D& outVector )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inVector0 | const Vector2D& | ||||
inVector1 | const Vector2D& | ||||
inRotationDirection | Optional<RotationDirection::Type> | NIL | Clockwise, counter-clockwise or auto | ||
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& |
Description
Note that because of inaccuracies of floating-point arithmetic, some geometric operations (including this one) may lead to unpredictable results for degenerated cases. In this filter such a case occurs when a zero vector is given on input.
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 acquired by mirroring inVector1 by a line determined by inVector0 and its length properly adjusted.