diff -r 4b40bdd214df -r 8a0d69c16cad rust/integral-geometry/src/lib.rs --- a/rust/integral-geometry/src/lib.rs Mon Oct 29 23:06:18 2018 +0100 +++ b/rust/integral-geometry/src/lib.rs Wed Oct 31 23:36:05 2018 +0100 @@ -73,6 +73,22 @@ bin_assign_op_impl!(MulAssign, mul_assign); bin_assign_op_impl!(DivAssign, div_assign); +#[derive(PartialEq, Eq, Clone, Copy, Debug)] +pub struct Rect { + pub x: i32, + pub y: i32, + pub width: u32, + pub height: u32, +} + +impl Rect { + #[inline] + pub fn new(x: i32, y: i32, width: u32, height: u32) -> Self { + Self { x, y, width, height } + } +} + + pub struct LinePoints { accumulator: Point, direction: Point,