Skip to content

Commit

Permalink
Feat/calc s inc based on last_d (#59)
Browse files Browse the repository at this point in the history
* Feat/calc SInc based on last_d

* 3.2.0
  • Loading branch information
ishiko732 authored Dec 1, 2023
1 parent b4162cc commit 83f48ef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio,line-clamp"></script>
<script type="module">
import * as tsFsrs from 'https://cdn.jsdelivr.net/npm/ts-fsrs@3.1.2/+esm';
import * as tsFsrs from 'https://cdn.jsdelivr.net/npm/ts-fsrs@3.2.0/+esm';
window.tsfsrs = tsFsrs
</script>
<title>TS-FSRS example</title>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-fsrs",
"version": "3.1.3",
"version": "3.2.0",
"description": "ts-fsrs is a TypeScript package used to implement the Free Spaced Repetition Scheduler (FSRS) algorithm. It helps developers apply FSRS to their flashcard applications, thereby improving the user learning experience.",
"main": "dist/ts-fsrs.js",
"module": "dist/ts-fsrs.mjs",
Expand Down
8 changes: 4 additions & 4 deletions src/fsrs/algorithm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,27 @@ export class FSRSAlgorithm {
): void {
s.again.difficulty = this.next_difficulty(last_d, Rating.Again);
s.again.stability = this.next_forget_stability(
s.again.difficulty,
last_d,
last_s,
retrievability,
);
s.hard.difficulty = this.next_difficulty(last_d, Rating.Hard);
s.hard.stability = this.next_recall_stability(
s.hard.difficulty,
last_d,
last_s,
retrievability,
Rating.Hard,
);
s.good.difficulty = this.next_difficulty(last_d, Rating.Good);
s.good.stability = this.next_recall_stability(
s.good.difficulty,
last_d,
last_s,
retrievability,
Rating.Good,
);
s.easy.difficulty = this.next_difficulty(last_d, Rating.Easy);
s.easy.stability = this.next_recall_stability(
s.easy.difficulty,
last_d,
last_s,
retrievability,
Rating.Easy,
Expand Down
2 changes: 1 addition & 1 deletion src/fsrs/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const default_w = [
];
export const default_enable_fuzz = false;

export const FSRSVersion: string = "3.1.3";
export const FSRSVersion: string = "3.2.0";

export const generatorParameters = (
props?: Partial<FSRSParameters>,
Expand Down

0 comments on commit 83f48ef

Please sign in to comment.