Files
luban-lite-t3e-pro/packages/third-party/awtk-ui/awtk/3rd/agge/agge/math.cpp
刘可亮 3b4064f334 v1.0.2
2023-11-30 19:48:02 +08:00

32 lines
501 B
C++

#include <agge/math.h>
#include <math.h>
namespace agge
{
template <>
inline float limits<float>::resolution()
{ return 1e-6f; }
template <>
inline double limits<double>::resolution()
{ return 1e-15; }
const real_t distance_epsilon = limits<real_t>::resolution();
const real_t pi = real_t(3.14159265359);
float sqrt(float x)
{ return ::sqrtf(x); }
double sqrt(double x)
{ return ::sqrt(x); }
float sin(float a)
{ return ::sinf(a); }
float cos(float a)
{ return ::cosf(a);}
}