Rectangle Contains Method Delta Engine Documentation

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

public bool Contains(
	Vector2D point
)

Return Value

Type: Boolean
Remarks

Tests: DeltaEngine.Tests.Datatypes.RectangleTests
Examples

1 unit tests call DeltaEngine.Datatypes.Rectangle.Contains(DeltaEngine.Datatypes.Vector2D)
[Test]
public void Contains()
{
    var rect = new Rectangle(1, 2, 10, 20);
    Assert.IsTrue(rect.Contains(new Vector2D(1, 2)));
    Assert.IsTrue(rect.Contains(new Vector2D(5, 5)));
    Assert.IsFalse(rect.Contains(new Vector2D(11, 5)));
    Assert.IsFalse(rect.Contains(new Vector2D(5, 22)));
}
See Also