diff options
author | Chris Robinson <[email protected]> | 2018-02-06 02:35:08 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-02-06 02:35:08 -0800 |
commit | f5f996c14a7d7c46f0967eee01af9b6b77caa4a7 (patch) | |
tree | bfa4a5f0fbf7325ca7037417784abe785a1720f0 /common | |
parent | da1ee3baba32e3a2525d90e97e172965d4f90287 (diff) |
Check for a cbrtf function
Diffstat (limited to 'common')
-rw-r--r-- | common/math_defs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/math_defs.h b/common/math_defs.h index cbe9091f..428f5181 100644 --- a/common/math_defs.h +++ b/common/math_defs.h @@ -29,6 +29,13 @@ static inline float log2f(float f) } #endif +#ifndef HAVE_CBRTF +static inline float cbrtf(float f) +{ + return powf(f, 1.0f/3.0f); +} +#endif + #define DEG2RAD(x) ((float)(x) * (F_PI/180.0f)) #define RAD2DEG(x) ((float)(x) * (180.0f/F_PI)) |