summaryrefslogtreecommitdiff
path: root/src/math/fdim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/fdim.c')
-rw-r--r--src/math/fdim.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/math/fdim.c b/src/math/fdim.c
index c39c6753..4f6b3896 100644
--- a/src/math/fdim.c
+++ b/src/math/fdim.c
@@ -4,7 +4,11 @@
TYPE TGFN(fdim)(TYPE x, TYPE y)
{
- return x - y;
+ if (x > y) {
+ return x - y;
+ }
+
+ return 0;
}
/*