Vector2D Equals Method (Object)Delta Engine Documentation

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

public override bool Equals(
	Object other
)

Return Value

Type: Boolean
Remarks

Tests: DeltaEngine.Tests.Datatypes.Vector2DTests
Examples

2 unit tests call DeltaEngine.Datatypes.Vector2D.Equals(System.Object)
[Test]
public void Equals()
{
    Assert.AreNotEqual(v1, v2);
    Assert.AreEqual(v1, new Vector2D(1, 2));
    Assert.IsTrue(v1 == new Vector2D(1, 2));
    Assert.IsTrue(v1 != v2);
    Assert.IsTrue(v1.Equals((object)new Vector2D(1, 2)));
}
[Test]
public void NearlyEquals()
{
    Assert.IsTrue(v1.IsNearlyEqual(new Vector2D(1.000001f, 1.99999f)));
    Assert.IsFalse(v1.IsNearlyEqual(new Vector2D(1, 2.1f)));
}
See Also