tu_math.h
来自「一个开源的Flash 播放器,可以在Windows/Linux 上运行」· C头文件 代码 · 共 41 行
H
41 行
// tu_math.h -- Willem Kokke// This source code has been donated to the Public Domain. Do// whatever you want with it.// platform abstract math.h include file#ifndef TU_MATH_H#define TU_MATH_H#include "base/tu_config.h"#include <math.h>#include <float.h>// OSX doesn't have single precision math functions defined in math.h#ifdef __MACH__ #define sinf sin #define cosf cos #define tanf tan #define asinf asin #define acosf acos #define atanf atan #define atan2f atan2 #define sqrtf sqrt #define logf log #define expf exp #define fabsf fabs #define powf pow#endif// isfinite() comes with C99; fake version here in case compiler lacks it.#ifndef isfinite#define isfinite(x) (sizeof(x) == sizeof(float) ? isfinitef(x) : isfinited(x))#define isfinitef(x) ((x) >= -FLT_MAX && (x) <= FLT_MAX) // NAN should fail this, yes?#define isfinited(x) ((x) >= -DBL_MAX && (x) <= DBL_MAX)#endif // not isfinite#endif // TU_MATH_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?