mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 12:52:34 +00:00
remove ResultPoint trait uses of Point
Point already has `x` and `y` properties, so accessing them with `getX()` and `getY()` is needlessly verbose. These calls have been removed, though the trait impl is still presen for the time being, since the OneDReader proc macro requires it.
This commit is contained in:
@@ -6,7 +6,7 @@ use crate::Point;
|
||||
*
|
||||
* @param patterns array of three {@code Point} to order
|
||||
*/
|
||||
pub fn orderBestPatterns<T: Into<Point>>(patterns: &mut [T; 3]) {
|
||||
pub fn orderBestPatterns<T: Into<Point> + Copy>(patterns: &mut [T; 3]) {
|
||||
// Find distances between pattern centers
|
||||
let zeroOneDistance = Point::distance(patterns[0].into(), patterns[1].into());
|
||||
let oneTwoDistance = Point::distance(patterns[1].into(), patterns[2].into());
|
||||
|
||||
Reference in New Issue
Block a user