[][src]Macro ingrid::offset

macro_rules! offset {
    ($x:expr, $y:expr) => { ... };
}

An offset instantiation helper.

This macro helps instantiate offsets with a shorter syntax. Instead of typing a full Offset::new(x, y), one simply has to write offset!(x, y) leading to more readable code.

Examples

assert_eq!(offset!(-1, 1), Offset::new(-1, 1));