23#include <kiwano/math/Constants.h>
30inline int Abs(
int val)
34inline float Abs(
float val)
38inline double Abs(
double val)
43inline float Sqrt(
float val)
47inline double Sqrt(
double val)
52inline float Pow(
float core,
float exponent)
54 return ::powf(core, exponent);
56inline double Pow(
double core,
double exponent)
58 return ::pow(core, exponent);
61inline int Sign(
int val)
63 return val < 0 ? -1 : 1;
65inline float Sign(
float val)
67 return val < 0 ? -1.f : 1.f;
69inline double Sign(
double val)
71 return val < 0 ? -1.0 : 1.0;
74inline float Degree2Radian(
float angle)
76 return angle * math::PI_F / 180.f;
78inline double Degree2Radian(
double angle)
80 return angle * math::PI_D / 180.0;
83inline float Radian2Degree(
float radian)
85 return radian * 180.f / math::PI_F;
87inline double Radian2Degree(
double radian)
89 return radian * 180.0 / math::PI_D;
92inline float Sin(
float val)
94 return ::sinf(Degree2Radian(val));
96inline double Sin(
double val)
98 return ::sin(Degree2Radian(val));
101inline float Cos(
float val)
103 return ::cosf(Degree2Radian(val));
105inline double Cos(
double val)
107 return ::cos(Degree2Radian(val));
110inline float Tan(
float val)
112 return ::tanf(Degree2Radian(val));
114inline double Tan(
double val)
116 return ::tan(Degree2Radian(val));
119inline float Asin(
float val)
121 return Radian2Degree(::asinf(val));
123inline double Asin(
double val)
125 return Radian2Degree(::asin(val));
128inline float Acos(
float val)
130 return Radian2Degree(::acosf(val));
132inline double Acos(
double val)
134 return Radian2Degree(::acos(val));
137inline float Atan(
float val)
139 return Radian2Degree(::atanf(val));
141inline double Atan(
double val)
143 return Radian2Degree(::atan(val));
146inline float Ceil(
float val)
150inline double Ceil(
double val)
155inline float Floor(
float val)
159inline double Floor(
double val)