mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
remove MathUtils::distance()
This commit is contained in:
@@ -290,7 +290,10 @@ impl<'a> WhiteRectangleDetector<'_> {
|
||||
}
|
||||
|
||||
fn get_black_point_on_segment(&self, a_x: f32, a_y: f32, b_x: f32, b_y: f32) -> Option<Point> {
|
||||
let dist = MathUtils::round(MathUtils::distance(a_x, a_y, b_x, b_y));
|
||||
let a = Point::new(a_x, a_y);
|
||||
let b = Point::new(b_x, b_y);
|
||||
|
||||
let dist = MathUtils::round(a.distance(b));
|
||||
let x_step: f32 = (b_x - a_x) / dist as f32;
|
||||
let y_step: f32 = (b_y - a_y) / dist as f32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user