Check for a cbrtf function
This commit is contained in:
@@ -510,6 +510,7 @@ CHECK_SYMBOL_EXISTS(_aligned_malloc malloc.h HAVE__ALIGNED_MALLOC)
|
||||
CHECK_SYMBOL_EXISTS(lrintf math.h HAVE_LRINTF)
|
||||
CHECK_SYMBOL_EXISTS(modff math.h HAVE_MODFF)
|
||||
CHECK_SYMBOL_EXISTS(log2f math.h HAVE_LOG2F)
|
||||
CHECK_SYMBOL_EXISTS(cbrtf math.h HAVE_CBRTF)
|
||||
|
||||
IF(HAVE_FLOAT_H)
|
||||
CHECK_SYMBOL_EXISTS(_controlfp float.h HAVE__CONTROLFP)
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -89,6 +89,9 @@
|
||||
/* Define if we have the log2f function */
|
||||
#cmakedefine HAVE_LOG2F
|
||||
|
||||
/* Define if we have the cbrtf function */
|
||||
#cmakedefine HAVE_CBRTF
|
||||
|
||||
/* Define if we have the strtof function */
|
||||
#cmakedefine HAVE_STRTOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user