Back to FabImage Library Lite websiteYou are here:
Start »
Geometry 2D »
Geometry 2D Features »
VectorDirection
Header: |
FIL.h
|
Namespace: |
fil |
Computes the direction angle of a vector as an angle in range the from 0 to 360.
Syntax
void fil::VectorDirection
(
const fil::Vector2D& inVector,
float& outDirection
)
Parameters
|
Name |
Type |
Default |
Description |
 |
inVector |
const Vector2D& |
|
|
 |
outDirection |
float& |
|
|
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
VectorDirection performed on a vector with parameters: DeltaX = 10, DeltaY = 10.
outDirection returns 45.