Back to Adaptive Vision Library website
You are here: Start » Function Reference » Geometry 2D Angle Metrics » AngleBetweenThreePoints
AngleBetweenThreePoints
Measures the angle defined by three consecutive points.
Syntax
C++
C#
void avl::AngleBetweenThreePoints ( const avl::Point2D& inPoint1, const avl::Point2D& inPoint2, const avl::Point2D& inPoint3, avl::RotationDirection::Type inRotationDirection, atl::Optional<float&> outAbsoluteAngle, atl::Optional<float&> outDirectedAngle, atl::Optional<avl::Arc2D&> diagArc )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inPoint1 | const Point2D& | A point on one arm of an angle | ||
inPoint2 | const Point2D& | The middle point | ||
inPoint3 | const Point2D& | A point on another arm of the angle | ||
inRotationDirection | RotationDirection::Type | Chooses one of two ways of measuring the angle | ||
outAbsoluteAngle | Optional<float&> | Angle value used for measurements <0, 360> | ||
outDirectedAngle | Optional<float&> | Angle value used for clockwise transformations <-360, 360> | ||
diagArc | Optional<Arc2D&> | Angle visualization object |
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 some two of the input points are almost equal.
Errors
Error type | Description |
---|---|
DomainError | Unsupported angle metric in AngleBetweenThreePoints. |