# C2000 Arctangent IQN

## Description

The Arctangent IQN block computes the four-quadrant arc tangent of the IQ number inputs and produces IQ number output.

Note

The implementation of this block does not call the corresponding Texas Instruments® library function during code generation. The Texas Instruments function uses a global Q setting and the MathWorks® code used by this block dynamically adjusts the Q format based on the block input. See Using the IQmath Library for more information.

## Parameters

Function

Type of arc tangent to calculate:

• `atan2` — Compute the four-quadrant arc tangent with output in radians with values from -pi to +pi.

• `atan2PU` — Compute the four-quadrant arc tangent per unit. If `atan2(B,A)` is greater than or equal to 0, `atan2PU(B,A) = atan2(B,A)/2*pi`. Otherwise, `atan2PU(B,A) = atan2(B,A)/2*pi+1`. The output is in per-unit radians with values from 0 to 2*pi radians.

Note

The order of the inputs to the Arctangent IQN block correspond to the Texas Instruments convention, with argument 'A' at the top and 'B' at bottom.

## References

For detailed information on the IQmath library, see the user's guide for the C28x IQmath Library - A Virtual Floating Point Engine, Literature Number SPRC087, available at the Texas Instruments Web site. The user's guide is included in the zip file download that also contains the IQmath library (registration required).