We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef433f3 commit 4b3dd4dCopy full SHA for 4b3dd4d
src/mediancut.rs
@@ -123,7 +123,7 @@ impl<'hist> MBox<'hist> {
123
pub fn prepare_color_weight_total(&mut self) -> f64 {
124
let median = self.median_color();
125
self.colors.iter_mut().map(move |a| {
126
- let w = median.diff(&a.color).sqrt() * (1. + a.adjusted_weight).sqrt();
+ let w = (median.diff(&a.color).sqrt() * (2. + a.adjusted_weight)).sqrt();
127
debug_assert!(w.is_finite());
128
a.mc_color_weight = w;
129
f64::from(w)
0 commit comments