22 lines
682 B
Rust
22 lines
682 B
Rust
mod geometry;
|
|
mod stream_algos;
|
|
|
|
use geometry::{Point, Rectangle};
|
|
|
|
fn main() {
|
|
let p = geometry::Point::new(2, 3);
|
|
let y = p;
|
|
dbg!(p + y);
|
|
|
|
let various = vec![
|
|
Rectangle::from_corner_width_height(Point::new(20, 110), 10, 10),
|
|
Rectangle::from_corner_width_height(Point::new(25, 115), 10, 10),
|
|
Rectangle::from_corner_width_height(Point::new(10, 100), 1000, 1000),
|
|
Rectangle::from_corner_width_height(Point::new(2010, 2100), 1, 1),
|
|
];
|
|
|
|
// Clone here so that we can continue to use the original if needed later.
|
|
let r: Vec<_> = stream_algos::translate(various.clone().drain(0..), Point::new(1, 2)).collect();
|
|
dbg!(&r);
|
|
}
|