atan2 - HLSL
Microsoft DirectX 9.0 SDK Update (October 2004)

atan2 - HLSL


Returns the arctangent of x/y. The signs of x and y are used to determine the quadrant of the return values in the range [-pi, pi]. atan2 is well-defined for every point other than the origin, even if y equals 0 and x does not equal 0.

Syntax

ret atan2(x, y)

Where:

NameIn/OutTemplate TypeComponent TypeSize
xinscalar, vector, or matrixfloatany
yinsame as input xfloatsame dimension(s) as input x
retoutsame as input xfloatsame dimension(s) as input x

Minimum Shader Version

This intrinsic function is supported in the following (or above) shader versions:

Vertex ShaderPixel Shader
vs_1_1ps_2_0


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.