Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.Datatypes.RectangleTests
5 unit tests call DeltaEngine.Datatypes.Rectangle.BottomRight
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Vector2DRemarks
Examples
[Test] public void CreateFromFivePoints() { var points = new List<Vector2D> { Vector2D.Zero, Vector2D.One, Vector2D.One * 1.5f, Vector2D.Half, -Vector2D.One }; var rectangle = Rectangle.FromPoints(points); Assert.AreEqual(-Vector2D.One, rectangle.TopLeft); Assert.AreEqual(Vector2D.One * 1.5f, rectangle.BottomRight); }
[Test] public void CreateFromTwoPoints() { var points = new List<Vector2D> { new Vector2D(4, 4), new Vector2D(3, 2) }; var rectangle = Rectangle.FromPoints(points); Assert.AreEqual(new Vector2D(3, 2), rectangle.TopLeft); Assert.AreEqual(new Vector2D(4, 4), rectangle.BottomRight); }
[Test] public void BottomRight() { var rect = new Rectangle(1, 2, 10, 20); Assert.AreEqual(new Vector2D(11, 22), rect.BottomRight); }
See Also