Back to Adaptive Vision Library website

You are here: Start » Function Reference » Geometry 2D Interpolations » LerpVectors

LerpVectors


Linearly interpolates between two vectors.

Syntax

C++
C#
 
void avl::LerpVectors
(
	const avl::Vector2D& inVector1,
	const avl::Vector2D& inVector2,
	const atl::real inLambda,
	avl::Vector2D& outVector
)

Parameters

Name Type Range Default Description
inVector1 const Vector2D&
inVector2 const Vector2D&
inLambda const real - - 0.5f 0.0 makes a copy of the first vector, 1.0 - of the second, other values make interpolations
outVector Vector2D&

Examples

LerpVectors performed on two vectors: inVector1 DeltaX = 50, DeltaY = 50, inVector2 DeltaX = -25, DeltaY = 25, inLambda = 0,25. The green vector is the output vector.