MCPcopy Create free account
hub / github.com/EricLengyel/Terathon-Math-Library / Fabs

Function Fabs

TSMath.h:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace Terathon
31{
32 inline float Fabs(const float& x)
33 {
34 #ifndef TERATHON_NO_SIMD
35
36 float result;
37
38 VecStoreX(VecAndc(VecLoadScalar(&x), VecFloatGetMinusZero()), &result);
39 return (result);
40
41 #else
42
43 return ((x < 0.0F) ? -x : x);
44
45 #endif
46 }
47
48 inline float Fnabs(const float& x)
49 {

Callers 7

FloorMethod · 0.85
CeilMethod · 0.85
SinMethod · 0.85
CosMethod · 0.85
TanMethod · 0.85
CosSinMethod · 0.85
ArctanMethod · 0.85

Calls 4

VecStoreXFunction · 0.85
VecAndcFunction · 0.85
VecLoadScalarFunction · 0.85
VecFloatGetMinusZeroFunction · 0.85

Tested by

no test coverage detected