CogMath DistancePointPoint Method Cognex VisionPro 9.22
Returns the length of the segment between the given points. Also provides the angle of the segment.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 87.0.0.0
Syntax

public static double DistancePointPoint(
	double startX,
	double startY,
	double endX,
	double endY,
	out double angle
)

Parameters

startX
Type: System Double

The x-coordinate of the start point.

startY
Type: System Double

The y-coordinate of the start point.

endX
Type: System Double

The x-coordinate of the end point.

endY
Type: System Double

The y-coordinate of the end point.

angle
Type: System Double 

The angle of the line segment formed by the points.

Return Value

Type: Double

The distance between the points.

Remarks

Returns the length of the segment between (startX,startY) and (endX,endY) and optionally its angle.

The angle is measured in radians from the x-axis and is normalized to the range -π to π.

See Also