HumanErrors constructor

HumanErrors({
  1. required StudentProfile profile,
  2. required Random rng,
  3. int repeats = 0,
  4. ErrorGains? gains,
  5. double windowMs = kDefaultRhythmToleranceMs,
})

Implementation

HumanErrors({
  required this.profile,
  required Random rng,
  this.repeats = 0,
  ErrorGains? gains,
  this.windowMs = kDefaultRhythmToleranceMs,
}) : gains = gains ?? ErrorGains.of(profile),
     _rng = rng {
  dayFactor = 1 + (rng.nextDouble() * 2 - 1) * this.gains.dayShare;
}