From 0653fc44bb5d9d2df740d68b940956cf8cdec5d2 Mon Sep 17 00:00:00 2001 From: AsukaMinato Date: Wed, 22 Nov 2023 15:04:52 +0900 Subject: [PATCH] fix --- src/optimal_retention.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 };