2 #include "oxygine-include.h" 10 inline T lerp(T a, T b,
float v)
12 return T(a + (b - a) * v);
18 #define MATH_PI 3.141592653589793f 20 inline float randFloat(
float start,
float size)
22 return ((rand() % RAND_MAX) * size) / (float)RAND_MAX + start;
25 inline double abs(
double s)
34 inline float abs(
float s)
43 inline float sign(
float s)
44 {
return s < 0 ? -1.0f : 1.0f;}
46 inline double sign(
double s)
47 {
return s < 0 ? -1.0 : 1.0;}
49 inline double sin(
double s)
52 inline float sin(
float s)
55 inline double cos(
double s)
58 inline float cos(
float s)
61 inline double acos(
double s)
64 inline float acos(
float s)
67 inline double tan(
double s)
70 inline float tan(
float s)
73 inline double sqrt(
double s)
76 inline float sqrt(
float s)
79 inline float sqrt(
int s)
80 {return ::sqrtf((
float)s);}
82 inline bool equal(
double a,
double b,
const double eps = 10e-8)
84 return ((a < b + eps) && (a > b - eps)) ? true :
false;
87 inline bool equal(
float a,
float b,
const float eps = (
float)(10e-6))
89 return ((a < b + eps) && (a > b - eps)) ? true :
false;
93 inline T clamp(T v, T min_, T max_)
–oxgl-end–!
Definition: Actor.h:14