summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Paśnikowski <marek@marekpasnikowski.pl>2024-01-14 11:23:24 +0100
committerMarek Paśnikowski <marek@marekpasnikowski.pl>2024-01-14 11:23:24 +0100
commit633092ddc9e736be227c189476666e245951a9f2 (patch)
treea24c66fdd626826e3a4dee846553b7578da73beb
parentbd120c8edf4c9f56534917bff1aba7fcd0d4e1c3 (diff)
Tweak Interval Computation
-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.