本文整理汇总了C#中Matrix3x2.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix3x2.Equals方法的具体用法?C# Matrix3x2.Equals怎么用?C# Matrix3x2.Equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix3x2
的用法示例。
在下文中一共展示了Matrix3x2.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Matrix3x2EqualsNanTest
public void Matrix3x2EqualsNanTest()
{
Matrix3x2 a = new Matrix3x2(float.NaN, 0, 0, 0, 0, 0);
Matrix3x2 b = new Matrix3x2(0, float.NaN, 0, 0, 0, 0);
Matrix3x2 c = new Matrix3x2(0, 0, float.NaN, 0, 0, 0);
Matrix3x2 d = new Matrix3x2(0, 0, 0, float.NaN, 0, 0);
Matrix3x2 e = new Matrix3x2(0, 0, 0, 0, float.NaN, 0);
Matrix3x2 f = new Matrix3x2(0, 0, 0, 0, 0, float.NaN);
Assert.False(a == new Matrix3x2());
Assert.False(b == new Matrix3x2());
Assert.False(c == new Matrix3x2());
Assert.False(d == new Matrix3x2());
Assert.False(e == new Matrix3x2());
Assert.False(f == new Matrix3x2());
Assert.True(a != new Matrix3x2());
Assert.True(b != new Matrix3x2());
Assert.True(c != new Matrix3x2());
Assert.True(d != new Matrix3x2());
Assert.True(e != new Matrix3x2());
Assert.True(f != new Matrix3x2());
Assert.False(a.Equals(new Matrix3x2()));
Assert.False(b.Equals(new Matrix3x2()));
Assert.False(c.Equals(new Matrix3x2()));
Assert.False(d.Equals(new Matrix3x2()));
Assert.False(e.Equals(new Matrix3x2()));
Assert.False(f.Equals(new Matrix3x2()));
Assert.False(a.IsIdentity);
Assert.False(b.IsIdentity);
Assert.False(c.IsIdentity);
Assert.False(d.IsIdentity);
Assert.False(e.IsIdentity);
Assert.False(f.IsIdentity);
// Counterintuitive result - IEEE rules for NaN comparison are weird!
Assert.False(a.Equals(a));
Assert.False(b.Equals(b));
Assert.False(c.Equals(c));
Assert.False(d.Equals(d));
Assert.False(e.Equals(e));
Assert.False(f.Equals(f));
}