You are here: Start » AVL.NET » AVL.ResizeVector
Lengthens or shortens a vector preserving its direction.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void ResizeVector ( AvlNet.Vector2D inVector, float inNewLength, out AvlNet.Vector2D outVector )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inVector | AvlNet.Vector2D | ||||
inNewLength | float | <0.0f, INF> | 1.0f | Default value: 1.0f. | |
outVector | AvlNet.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.