aboutsummaryrefslogtreecommitdiffstats
path: root/src/int_math.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-10-06 23:34:36 +0200
committerDavid Robillard <d@drobilla.net>2020-06-21 18:12:04 +0200
commit8eb706747dafe8aa72cba2ac9588ae4a16a1e8d3 (patch)
tree576b950d33e326863be8361e31776e2b1ff30939 /src/int_math.h
parent0fe3be0742697deb4926f14cb3fa06cf65314f21 (diff)
downloadserd-8eb706747dafe8aa72cba2ac9588ae4a16a1e8d3.tar.gz
serd-8eb706747dafe8aa72cba2ac9588ae4a16a1e8d3.tar.bz2
serd-8eb706747dafe8aa72cba2ac9588ae4a16a1e8d3.zip
Add precise floating point parsing
Diffstat (limited to 'src/int_math.h')
-rw-r--r--src/int_math.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/int_math.h b/src/int_math.h
index 85305a4a..d36a44d2 100644
--- a/src/int_math.h
+++ b/src/int_math.h
@@ -21,6 +21,7 @@
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) > (y) ? (x) : (y))
+#define CLAMP(x, l, h) MAX(l, MIN(h, x))
static const uint64_t POW10[] = {1ull,
10ull,