public Rect2i(Rect2i r) { position = new Vec2i(r.position); Width = r.Width; Height = r.Height; }
public Rect2i(Vec2i bottomleft, Vec2i topRight) { position = new Vec2i(bottomleft); Width = topRight.X - bottomleft.X; Height = topRight.Y - bottomleft.Y; }
public Rect2i(Vec2i bottomleft, int psize) { position = new Vec2i(bottomleft); Width = psize; Height = psize; }
public Rect2i(Vec2i bottomleft, int pwidth, int pheight) { position = new Vec2i(bottomleft); Width = pwidth; Height = pheight; }
public Rect2i(int bl_x, int bl_y, int pwidth, int pheight) { position = new Vec2i(bl_x, bl_y); Width = pwidth; Height = pheight; }
public bool Includes(Vec2i vec) { return(vec.X > position.X && vec.Y > position.Y && vec.X < tr.X && vec.Y < tr.Y); }