Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.Datatypes.SizeTests
2 unit tests call DeltaEngine.Datatypes.Size.Equals(DeltaEngine.Datatypes.Size)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- other
- Type: DeltaEngine.Datatypes Size
Return Value
Type: BooleanImplements
IEquatable T Equals(T)Remarks
Examples
[Test] public void Equals() { var s1 = new Size(1, 2); var s2 = new Size(3, 4); Assert.AreNotEqual(s1, s2); Assert.AreEqual(s1, new Size(1, 2)); Assert.AreNotEqual(s1, new Size(1, 2.00001f)); Assert.AreNotEqual(s1, new Vector2D(1, 2)); Assert.IsTrue(s1 == new Size(1, 2)); Assert.IsTrue(s1 != s2); }
[Test] public void NearlyEquals() { var s1 = new Size(1, 2); Assert.IsTrue(s1.IsNearlyEqual(new Size(0.99999f, 2.00001f))); Assert.IsTrue(s1.IsNearlyEqual(new Size(1, 2.00001f))); Assert.IsFalse(s1.IsNearlyEqual(new Size(0.9f, 2.00001f))); Assert.IsFalse(s1.IsNearlyEqual(new Size(1, 2.1f))); }
See Also