Admin Production ni-theme
Current Publication

atan2

LabWindows/CVI

atan2

double atan2 (double yValue, double xValue);

Purpose

Computes the principal value of the arc tangent of (yValue/xValue) using the signs of both arguments to determine the quadrant of the return value.

Parameters

Input
Name Type Description
yValue double Contains the numerator of the value used as the argument to the function.
xValue double Contains the denominator of the value used as the argument to the function.

Return Value

Name Type Description
result double Contains the arc tangent of (yValue/xValue) returned by the function. The returned value is in the range [-PI,PI]. If both xValue and yValue are zero, atan2 returns 0.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Example

Refer to analysis\iirfiltr.cws for an example of using the atan2 function.