From 41829d209cfdbafcb48e544f29f3a92d6a52ab50 Mon Sep 17 00:00:00 2001 From: Beinsezii Date: Mon, 29 Jan 2024 14:52:23 -0800 Subject: [PATCH] Fix `hk_high2023_comp()` formula Wasn't multiplying the mean delta by chroma whoops --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index bcd022b..8fdabcc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -268,7 +268,7 @@ pub extern "C" fn hk_high2023(lch: &[f32; 3]) -> f32 { /// High et al 2023 implementation. #[no_mangle] pub extern "C" fn hk_high2023_comp(lch: &mut [f32; 3]) { - lch[0] += HIGH2023_MEAN * (lch[1] / 100.0) - hk_high2023(lch) + lch[0] += (HIGH2023_MEAN - hk_high2023(lch)) * (lch[1] / 100.0) } // ### Helmholtz-Kohlrausch ### }}}