Type Definition olc_pixel_game_engine::Vi2d
source · pub type Vi2d = V2d<i32>;
Expand description
Mirror of olc::vi2d
. A 2D integer vector type.
Implements std::ops::Add
, std::ops::Sub
, std::ops::Mul
, and std::ops::Div
as well as
all their assignment equivalents.
Example usage:
let mut a = Vi2d::new(1, 2) + Vi2d { x: 3, y: 4 };
a *= (2i32, 2i32).into();
assert_eq!(a, Vi2d::new(8, 12));