26 #ifndef SPL_HEADLESS_MODE 28 #endif // SPL_HEADLESS_MODE 35 extern const double PI;
42 extern const double E;
48 double cosDegrees(
double angle);
57 int countDigits(
int n,
int base = 10);
69 bool floatingPointEqual(T f1, T f2, T tolerance) {
70 return (std::fabs(f1 - f2) <= tolerance);
82 bool floatingPointEqual(T f1, T f2) {
83 return floatingPointEqual(f1, f2, (T) std::numeric_limits<T>::epsilon() * std::fmax(fabs(f1), fabs(f2)));
95 bool floatingPointEqual(T f1,
int f2) {
96 return floatingPointEqual(f1, (T) f2);
108 bool floatingPointEqual(
int f1, T f2) {
109 return floatingPointEqual((T) f1, f2);
121 bool floatingPointEqual(T f1,
long int f2) {
122 return floatingPointEqual(f1, (T) f2);
134 bool floatingPointEqual(
long int f1, T f2) {
135 return floatingPointEqual((T) f1, f2);
142 double sinDegrees(
double angle);
148 double tanDegrees(
double angle);
153 double toDegrees(
double radians);
158 double toRadians(
double degrees);
166 double vectorAngle(
double x,
double y);
174 double vectorAngle(
const GPoint& pt);
179 double vectorDistance(
double x,
double y);
184 double vectorDistance(
const GPoint& pt);
This struct contains real-valued x and y fields.
Definition: gtypes.h:198