MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / atanFast

Function atanFast

libraries/FastTrig/FastTrig.cpp:382–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380
381
382float atanFast(float x)
383{
384 // remove two test will limit the input range but makes it even faster.
385 if ( x > 1) return ( M_PI / 2) - atanHelper(1.0 / x);
386 if ( x < -1) return (-M_PI / 2) - atanHelper(1.0 / x);
387 return atanHelper(x);
388}
389
390
391inline float atanHelper(float x)

Callers 2

atan2FastFunction · 0.85
unittestFunction · 0.85

Calls 1

atanHelperFunction · 0.85

Tested by 1

unittestFunction · 0.68