mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 12:52:34 +00:00
in_progress port from cpp
This commit is contained in:
@@ -25,6 +25,14 @@ pub fn point(x: f32, y: f32) -> Point {
|
||||
Point::new(x, y)
|
||||
}
|
||||
|
||||
pub fn point_g<T: TryInto<f32>>(x: T, y: T) -> Option<Point> {
|
||||
Some(Point::new(x.try_into().ok()?, y.try_into().ok()?))
|
||||
}
|
||||
|
||||
pub fn point_i(x: u32, y: u32) -> Point {
|
||||
Point::new(x as f32, y as f32)
|
||||
}
|
||||
|
||||
/** Currently necessary because the external OneDReader proc macro uses it. */
|
||||
pub type RXingResultPoint = Point;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user