MCPcopy Create free account
hub / github.com/defold/defold / fmod

Function fmod

engine/dlib/src/basis/encoder/cppspmd_sse.h:1525–1525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1523
1524CPPSPMD_FORCE_INLINE vfloat frac(const vfloat& a) { return a - floor(a); }
1525CPPSPMD_FORCE_INLINE vfloat fmod(vfloat a, vfloat b) { vfloat c = frac(abs(a / b)) * abs(b); return spmd_ternaryf(a < 0, -c, c); }
1526CPPSPMD_FORCE_INLINE vfloat sign(const vfloat& a) { return spmd_ternaryf(a < 0.0f, 1.0f, 1.0f); }
1527
1528CPPSPMD_FORCE_INLINE vint max(const vint& a, const vint& b) { return vint{ max_epi32(a.m_value, b.m_value) }; }

Callers 4

SetCursorFunction · 0.85
PostProcessSamplesFunction · 0.85
math_fmodFunction · 0.85
btFmodFunction · 0.85

Calls 3

fracFunction · 0.85
absFunction · 0.85
spmd_ternaryfFunction · 0.85

Tested by

no test coverage detected