Back to Adaptive Vision Library website

You are here: Start » Function Reference » Geometry 2D Angle Metrics » AngleBetweenDirections

AngleBetweenDirections


Measures the rotation angle from first to second direction.

Syntax

C++
C#
 
void avl::AngleBetweenDirections
(
	atl::real inDirection1,
	atl::real inDirection2,
	atl::Optional<avl::RotationDirection::Type> inRotationDirection,
	avl::AngleRange::Type inAngleRange,
	atl::Optional<atl::real&> outAbsoluteAngle,
	atl::Optional<atl::real&> outDirectedAngle
)

Parameters

Name Type Default Description
inDirection1 real Start direction
inDirection2 real Target direction
inRotationDirection Optional<RotationDirection::Type> NIL Clockwise, counter-clockwise or automatic (by smaller angle)
inAngleRange AngleRange::Type Switches between ranges <0, 180) and <0, 360)
outAbsoluteAngle Optional<real&> Angle value used for measurements <0, 360>
outDirectedAngle Optional<real&> Angle value used for clockwise transformations <-360, 360>

Description

Direction is a number in the range of <0, 180) or <0, 360). This is controlled with the inAngleRange input. The angle is computed from first to second direction clockwise or counter-clockwise. If the rotation direction is not specified, chosen is the one that produces smaller absolute angle.

Examples

See Also