Rectangle IsNearlyEqual Method Delta Engine Documentation

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

public bool IsNearlyEqual(
	Rectangle other
)

Return Value

Type: Boolean
Remarks

Tests: DeltaEngine.Tests.Datatypes.RectangleTests
Examples

1 unit tests call DeltaEngine.Datatypes.Rectangle.IsNearlyEqual(DeltaEngine.Datatypes.Rectangle)
[Test]
public void GetRotatedRectangleCornersWith180DegreesRotation()
{
    var points = new Rectangle(1, 1, 1, 1).GetRotatedRectangleCorners(Vector2D.Zero, 180);
    Assert.IsTrue(points[0].IsNearlyEqual(-Vector2D.One));
    Assert.IsTrue(points[1].IsNearlyEqual(-new Vector2D(1, 2)));
    Assert.IsTrue(points[2].IsNearlyEqual(-new Vector2D(2, 2)));
}
See Also