summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 7622269..706928d 100644
--- a/src/util.h
+++ b/src/util.h
@@ -6,8 +6,13 @@
#define UTIL_H
#include <QPoint>
+#include <QString>
#include <cmath>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846264338327950288
+#endif
+
// interpolate on a cubic bezier curve
float bezierInterpolate(float dist, float c0, float c1, float c2, float c3);
QPointF bezierInterpolateFull (float dist, QPointF c0, QPointF c1, QPointF c2, QPointF c3);
@@ -15,6 +20,7 @@ QPointF bezierInterpolateFull (float dist, QPointF c0, QPointF c1, QPointF c2, Q
// rounding
float roundToNearest(float stepSize, float val);
float radiansToDegrees (float radians);
+QString floatToString(float f);
// angles
float degreesToRadians(float degrees);