Rectangle BottomRight Property Delta Engine Documentation

Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public Vector2D BottomRight { get; }

Property Value

Type: Vector2D
Remarks

Tests: DeltaEngine.Tests.Datatypes.RectangleTests
Examples

5 unit tests call DeltaEngine.Datatypes.Rectangle.BottomRight
[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