summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dda.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dda.c b/dda.c
index 15c7b1c..6915d8b 100644
--- a/dda.c
+++ b/dda.c
@@ -21,7 +21,10 @@ next_sample_x (double x)
}
if (s > 1.0)
+ {
s -= 1.0;
+ i += 1;
+ }
return s + i;
}