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

AVL.AngleBetweenThreePoints Method

Measures the angle defined by three consecutive points.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void AngleBetweenThreePoints(
	AvlNet.Point2D inPoint1,
	AvlNet.Point2D inPoint2,
	AvlNet.Point2D inPoint3,
	AvlNet.RotationDirection inRotationDirection,
	out float outAbsoluteAngle,
	out float outDirectedAngle,
	out AvlNet.Arc2D diagArc
)

Parameters

Name Type Range Default Description
inPoint1AvlNet.Point2DA point on one arm of an angle.
inPoint2AvlNet.Point2DThe middle point.
inPoint3AvlNet.Point2DA point on another arm of the angle.
inRotationDirectionAvlNet.RotationDirectionChooses one of two ways of measuring the angle.
outAbsoluteAnglefloatAngle value used for measurements <0, 360>
outDirectedAnglefloatAngle value used for clockwise transformations <-360, 360>
diagArcAvlNet.Arc2DAngle 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.

See also