diff --git a/src/optimal_retention.rs b/src/optimal_retention.rs index fdaf0fcf..9926c020 100644 --- a/src/optimal_retention.rs +++ b/src/optimal_retention.rs @@ -551,7 +551,7 @@ impl FSRS { } // update by at least tol1 u = x + if rat.abs() < tol1 { - rat.is_sign_positive() as i8 as f64 * tol1 + tol1 * if rat >= 0.0 { 1.0 } else { -1.0 } } else { rat };