Exemplo n.º 1
0
		/// <summary>
		/// 获取两个范围的交集
		/// </summary>
		public Bound2 GetIntersection(Bound2 other)
		{
			other.x = x.GetIntersection(other.x);
			other.y = y.GetIntersection(other.y);
			return other;
		}
Exemplo n.º 2
0
		/// <summary>
		/// 扩展以包含指定范围
		/// </summary>
		public void Encapsulate(Bound2 other)
		{
			x.Encapsulate(other.x);
			y.Encapsulate(other.y);
		}
Exemplo n.º 3
0
		/// <summary>
		/// 判断是否与另一范围有交集
		/// </summary>
		public bool Intersects(Bound2 other)
		{
			return x.Intersects(other.x) && y.Intersects(other.y);
		}