changeset 980:43594ac98f91

Move dmClamp*() functions back to dmlib.h
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 27 Feb 2015 16:25:02 +0200
parents 76e8dcfeb808
children 25d653664874
files src/dmcurves.h src/dmlib.h
diffstat 2 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmcurves.h	Fri Feb 27 16:24:42 2015 +0200
+++ b/src/dmcurves.h	Fri Feb 27 16:25:02 2015 +0200
@@ -29,18 +29,6 @@
 DMFloat    dmCatmullRom(const DMFloat t, const DMFloat p0, const DMFloat p1, const DMFloat p2, const DMFloat p3);
 
 
-static inline DMFloat dmClamp10(const DMFloat a)
-{
-    return (a < 0.0f ? 0.0f : (a > 1.0f ? 1.0f : a));
-}
-
-
-static inline int dmClamp(const int v, const int min, const int max)
-{
-    return (v < min ? min : (v > max ? max : v));
-}
-
-
 static inline DMFloat dmLerpSCurve(DMLerpContext *ctx, const DMFloat step)
 {
     const DMFloat n = step / ctx->nsteps;
--- a/src/dmlib.h	Fri Feb 27 16:24:42 2015 +0200
+++ b/src/dmlib.h	Fri Feb 27 16:25:02 2015 +0200
@@ -206,6 +206,18 @@
 }
 
 
+static inline DMFloat dmClamp10(const DMFloat a)
+{
+    return (a < 0.0f ? 0.0f : (a > 1.0f ? 1.0f : a));
+}
+
+
+static inline int dmClamp(const int v, const int min, const int max)
+{
+    return (v < min ? min : (v > max ? max : v));
+}
+
+
 /* Arbitrary line drawing
  */
 #ifdef DM_GFX_LINES