estimateCurrentRetention static method

double estimateCurrentRetention(
  1. double halfLife,
  2. double daysSinceLastReview
)

Point estimate of current retention for a topic, given its half-life and days since last review.

Implementation

static double estimateCurrentRetention(
  double halfLife,
  double daysSinceLastReview,
) {
  if (halfLife <= 0) return 0;
  return math.pow(2, -daysSinceLastReview / halfLife).toDouble();
}