thyagoluciano / sm2

SM-2 is a simple spaced repetition algorithm. It calculates the number of days to wait before reviewing a piece of information based on how easily the the information was remembered today.
GNU General Public License v3.0
199 stars 25 forks source link

PreviousInterval shoud be an integer not double #3

Closed tomaszsluszniak closed 4 years ago

tomaszsluszniak commented 4 years ago

According to the readme, previousInterval should be an integer, not double. https://github.com/thyagoluciano/sm2/blob/4e773fd30723b6a4d64cdaffa782dfa5198e197c/lib/sm.dart#L7

And there is also a bug in example:

    SmResponse smResponse = sm.calc(
      quality: 0,
      repetitions: 0,
      previousInterval: 2.5,
      previousEaseFactor: 0
    );

default value for previousInterval should be zero, and previousEaseFactor should be 2.5 not zero.