Back to Aurora Vision Studio website

You are here: Start » Filter Reference » Geometry 2D » Geometry 2D Angle Metrics » AngleBetweenVectors

AngleBetweenVectors


Module: FoundationLite

Measures the angle between two vectors.

Name Type Description
Input value inVector1 Vector2D Start vector
Input value inVector2 Vector2D Target vector
Input value inRotationDirection RotationDirection* Clockwise, counter-clockwise or automatic (by smaller angle)
Output value outAbsoluteAngle Real Angle value used for measurements <0; 360>
Output value outDirectedAngle Real Angle value used for clockwise transformations <-360; 360>

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

AngleBetweenVectors performed on two vectors: inVector1 DeltaX = 10, DeltaY = 10, inVector2 DeltaX = -5, DeltaY = 5, inRotationDirection = CounterClockwise.
outAbsoluteAngle returns 270, and outDirectedAngle returns -270.

Complexity Level

This filter is available on Basic Complexity Level.