summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--org-fc-algo-tn.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/org-fc-algo-tn.el b/org-fc-algo-tn.el
index 9b547d4..90b5419 100644
--- a/org-fc-algo-tn.el
+++ b/org-fc-algo-tn.el
@@ -4,9 +4,9 @@
(defun nth-tn (n)
"The mathematical formula for the Nth triangular number."
- (- (/ (* n (1+ n))
- 2)
- 0.5))
+ (if (zerop n)
+ 0
+ (/ (* n (1+ n)) 4.0)))
(defun org-fc-algo-tn-next-parameters (ease box interval rating)
"Calculate the next parameters of a card, based on the review RATING.