mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 12:52:34 +00:00
cargo fmt
This commit is contained in:
@@ -686,10 +686,10 @@ impl FinderPatternFinder {
|
||||
// vary too much. We arbitrarily say that when the total deviation from average exceeds
|
||||
// 5% of the total module size estimates, it's too much.
|
||||
let average = totalModuleSize / max as f32;
|
||||
let totalDeviation = self.possibleCenters.iter().fold(0.0, |acc, pattern| {
|
||||
acc + (pattern.getEstimatedModuleSize() - average).abs()
|
||||
let totalDeviation = self.possibleCenters.iter().fold(0.0, |acc, pattern| {
|
||||
acc + (pattern.getEstimatedModuleSize() - average).abs()
|
||||
});
|
||||
|
||||
|
||||
totalDeviation <= 0.05 * totalModuleSize
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user