public GRect(GVec2 location, decimal SizeX, decimal SizeY) { this.X = location.X; this.Y = location.Y; this.SizeX = SizeX; this.SizeY = SizeY; }
public GRect(GVec2 upperRight, GVec2 lowerLeft) { this.X = upperRight.X; this.Y = upperRight.Y; this.SizeX = upperRight.X - lowerLeft.X; this.SizeY = upperRight.Y - lowerLeft.Y; }
public bool IntersectsWith(GVec2 point) { if (this.X < point.X && this.X + this.SizeX > point.X && this.Y < point.Y && this.Y + this.SizeY > point.Y) { return(true); } return(false); }
public GRect(GVec2 location) { this.X = location.X; this.Y = location.Y; this.Location = location; }