Back to Adaptive Vision Library website
You are here: Start » Function Reference » Geometry 2D Spatial Transforms » RescaleVector
Lengthens or shortens a vector relatively preserving its direction.
Syntax
C++
C#
void avl::RescaleVector ( const avl::Vector2D& inVector, float inScale, bool inInverse, avl::Vector2D& outVector )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inVector | const Vector2D& | |||
inScale | float | 1.0f | Scaling factor | |
inInverse | bool | Switches to the inverse operation | ||
outVector | Vector2D& |
Examples
Errors
Error type | Description |
---|---|
DomainError | inScale cannot be zero in an inverse scaling in RescaleVector. |