_mm_atan2_ps

Calculates the arc tangent of float32 variables x and y. Vector variant of atan2(x, y) function for a 128-bit vector argument of four float32 values.

Syntax

extern __m128 __cdecl _mm_atan2_ps(__m128 v1, __128 v2);

Arguments

v1

128-bit vector with float32 values

v1

128-bit vector with float32 values

Description

Calculates the arc tangent of corresponding float32 elements of vectors v1 and v2. The following is an illustration of the atan2 operation:

Res[0] = atan2(v1[0], v2[0]) Res[1] = atan2(v1[1], v2[1]) Res[2] = atan2(v1[2], v2[2]) Res[15] = atan2(v1[15], v2[15]) ...

Note iconNote

This calculation is similar to calculating the arc tangent of y / x, except that the signs of both arguments are used to determine the quadrant of the result.

Returns

128-bit vector with the result of the operation.