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
Where:
Name | In/Out | Template Type | Component Type | Size |
---|
x | in | scalar, vector, or matrix | float | any |
y | in | same as input x | float | same dimension(s) as input x |
ret | out | same as input x | float | same dimension(s) as input x |
Minimum Shader Version
This intrinsic function is supported in the following (or above) shader versions:
Vertex Shader | Pixel Shader |
---|
vs_1_1 | ps_2_0 |