imaqGetAngle

NI Vision for LabWindows/CVI Function

imaqGetAngle

Usage

int imaqGetAngle(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2, float* angle);

Purpose

Returns the angle, in degrees, between two lines. The returned angle represents the rotation around start1 required so that the line from start1 to end1 is parallel with the line from start2 to end2. The following figure illustrates how the function calculates the angle between two lines.

Parameters

Name

Type

Description

start1 PointFloat The start point of the first line.
end1 PointFloat The end point of the first line.
start2 PointFloat The start point of the second line.
end2 PointFloat The end point of the second line.
angle float* On return, the angle, in degrees, between the lines. This parameter is required and cannot be NULL.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().