Back to Aurora Vision Library Lite website
You are here: Start » Geometry 2D » Geometry 2D Spatial Transforms » ResizeVector
ResizeVector
Header: | AVL.h |
---|---|
Namespace: | avl |
Lengthens or shortens a vector preserving its direction.
Syntax
void avl::ResizeVector ( const avl::Vector2D& inVector, float inNewLength, avl::Vector2D& outVector )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inVector | const Vector2D& | ||||
inNewLength | float | 0.0 - | 1.0f | ||
outVector | Vector2D& |
In-place Processing
This function supports in-place data processing - you can pass the same reference to inVector and outVector
Read more about In-place Computation.
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.