Skip to content

Commit

Permalink
Fix hk_high2023_comp() formula
Browse files Browse the repository at this point in the history
Wasn't multiplying the mean delta by chroma whoops
  • Loading branch information
Beinsezii committed Jan 29, 2024
1 parent ac09f4d commit 41829d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ### }}}
Expand Down

0 comments on commit 41829d2

Please sign in to comment.