X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fcommon.rs;h=442b11c5eb00c74e47fea8fb7a6e9bc4a9a63484;hb=0b5024d131d93cf4073479cd31506be826c1a4b2;hp=283640e87667e53ada0a7ecf6bfb332b98016b5e;hpb=98995f2b580d872a5a21b34869fe024fafdf4260;p=kaka%2Frust-sdl-test.git diff --git a/src/common.rs b/src/common.rs index 283640e..442b11c 100644 --- a/src/common.rs +++ b/src/common.rs @@ -37,6 +37,13 @@ impl AddAssign for Point2D { } } +#[macro_export] +macro_rules! rect { + ( $x:expr, $y:expr ) => { + Rect { x: $x, y: $y } + }; +} + #[derive(Default)] pub struct Rect { pub width: T,