Vector3DTests Equals Method Delta Engine Documentation

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

public void Equals()
Examples

[Test]
public void Equals()
{
    Assert.AreEqual(v1, new Vector3D(1, 2, -3));
    Assert.IsTrue(v1 == new Vector3D(1, 2, -3));
    Assert.IsTrue(v1.Equals((object)new Vector3D(1, 2, -3)));
    Assert.IsFalse(v1.Equals((object)new Vector3D(1.000001f, 2, -3)));
    Assert.AreNotEqual(v1, v2);
    Assert.AreNotEqual(v1, new Vector3D(1.000001f, 2, -3));
    Assert.IsTrue(v1 != v2);
}
[Test]
public void NearlyEquals()
{
    Assert.IsTrue(v1.IsNearlyEqual(new Vector3D(1.000001f, 1.99999f, -2.99999f)));
    Assert.IsFalse(v1.IsNearlyEqual(new Vector3D(1, 2.1f, -3)));
}
See Also