You are here: Start » AVL.NET » AVL.AngleBetweenDirections Method

AVL.AngleBetweenDirections Method

Measures the rotation angle from first to second direction.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void AngleBetweenDirections(
	float inDirection1,
	float inDirection2,
	AvlNet.RotationDirection? inRotationDirection,
	AvlNet.AngleRange inAngleRange,
	out float outAbsoluteAngle,
	out float outDirectedAngle
)

Parameters

Name Type Range Default Description
inDirection1floatStart direction.
inDirection2floatTarget direction.
inRotationDirectionAvlNet.RotationDirection?Clockwise, counter-clockwise or automatic (by smaller angle). Default value: atl::NIL, or null.
inAngleRangeAvlNet.AngleRangeSwitches between ranges <0, 180) and <0, 360)
outAbsoluteAnglefloatAngle value used for measurements <0, 360>
outDirectedAnglefloatAngle 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