MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / atan2

Function atan2

Source/astcenc_vecmathlib.h:301–306  ·  view source on GitHub ↗

* @brief Return fast, but approximate, vector atan2(x, y). */

Source from the content-addressed store, hash-verified

299 * @brief Return fast, but approximate, vector atan2(x, y).
300 */
301ASTCENC_SIMD_INLINE vfloat atan2(vfloat y, vfloat x)
302{
303 vfloat z = atan(abs(y / x));
304 vmask xmask = x < vfloat::zero();
305 return change_sign(select(z, vfloat(astc::PI) - z, xmask), y);
306}
307
308/*
309 * @brief Factory that returns a unit length 4 component vfloat4.

Callers 2

compute_angular_offsetsFunction · 0.85
TESTFunction · 0.85

Calls 5

atanFunction · 0.85
change_signFunction · 0.85
vfloatClass · 0.85
absFunction · 0.70
selectFunction · 0.70

Tested by 1

TESTFunction · 0.68