Rectangle Right Property Delta Engine Documentation

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

public float Right { get; set; }

Property Value

Type: Single
Remarks

Tests: DeltaEngine.Tests.Datatypes.RectangleTests
Examples

3 unit tests call DeltaEngine.Datatypes.Rectangle.Right
[Test]
public void Right()
{
    var rect = new Rectangle(1, 2, 10, 20) { Right = 13 };
    Assert.AreEqual(3, rect.Left);
    Assert.AreEqual(13, rect.Right);
    Assert.AreEqual(10, rect.Width);
}
[Test]
public void TopRight()
{
    var rect = new Rectangle(1, 2, 10, 20);
    Assert.AreEqual(new Vector2D(11, 2), rect.TopRight);
}
[Test]
public void BottomRight()
{
    var rect = new Rectangle(1, 2, 10, 20);
    Assert.AreEqual(new Vector2D(11, 22), rect.BottomRight);
}
See Also