public Bounds2 Bounds2() { Bounds2 result = new Bounds2(this.Point00, this.Point00); result.Add(this.Point10); result.Add(this.Point01); result.Add(this.Point11); return(result); }
public Bounds2 CalcBounds() { Vector2 vector = this.X(); Vector2 vector2 = this.Y(); Vector2 center = this.Center; Bounds2 result = new Bounds2(center, center); result.Add(center - vector - vector2); result.Add(center + vector - vector2); result.Add(center + vector + vector2); result.Add(center - vector + vector2); return(result); }
public Bounds2 CalcBounds() { Bounds2 result; if (this.Size() == 0u) { result = Bounds2.Zero; } else { Bounds2 bounds = new Bounds2(this.GetPoint(0), this.GetPoint(0)); for (int num = 1; num != (int)this.Size(); num++) { bounds.Add(this.GetPoint(num)); } result = bounds; } return(result); }