Calculate minimum angle between two lines measured in [0, 90] degrees range.

Namespace:  AForge.Math.Geometry
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public static float GetAngleBetweenLines(
	Point a1,
	Point a2,
	Point b1,
	Point b2
)

Parameters

a1
Type: AForge..::.Point
A point on the first line.
a2
Type: AForge..::.Point
Another point on the first line.
b1
Type: AForge..::.Point
A point on the second line.
b2
Type: AForge..::.Point
Another point on the second line.

Return Value

Returns minimum angle between two lines.

Remarks

Note:It is preferred to use GetAngleBetweenLines(Line) if it is required to calculate angle multiple times for one of the lines.

Exceptions

ExceptionCondition
System..::.ArgumentExceptiona1 and a2 are the same, -OR- b1 and b2 are the same.

See Also