mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
remove MathUtils::distance()
This commit is contained in:
@@ -2,10 +2,7 @@
|
||||
use num::integer::Roots;
|
||||
|
||||
use crate::{
|
||||
common::{
|
||||
detector::MathUtils, BitMatrix, DefaultGridSampler, DetectorRXingResult, GridSampler,
|
||||
Result,
|
||||
},
|
||||
common::{BitMatrix, DefaultGridSampler, DetectorRXingResult, GridSampler, Result},
|
||||
Exceptions, Point,
|
||||
};
|
||||
|
||||
@@ -349,8 +346,8 @@ pub fn detect(image: &BitMatrix, try_harder: bool) -> Result<MaxicodeDetectionRe
|
||||
|
||||
let [tl, bl, tr, br] = &symbol_box.0;
|
||||
|
||||
let target_width = MathUtils::distance(tl.0, tl.1, tr.0, tr.1);
|
||||
let target_height = MathUtils::distance(br.0, br.1, tr.0, tr.1);
|
||||
let target_width = Point::distance(tl.into(), tr.into());
|
||||
let target_height = Point::distance(br.into(), tr.into());
|
||||
|
||||
// let target_width = (tr.0 - tl.0).round().abs() as u32;
|
||||
// let target_height = (br.1 - tr.1).round().abs() as u32;
|
||||
|
||||
Reference in New Issue
Block a user