本文整理汇总了C#中Vertex.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# Vertex.GetHashCode方法的具体用法?C# Vertex.GetHashCode怎么用?C# Vertex.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vertex
的用法示例。
在下文中一共展示了Vertex.GetHashCode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestGetHashCode
public void TestGetHashCode()
{
var vertex = new Vertex(12.34f, -98.7f, 54);
Assert.Equal(
(12.34f).GetHashCode() ^ (-98.7f).GetHashCode() ^ (54f).GetHashCode()
, vertex.GetHashCode()
);
}
示例2: TestGetHashCode
public void TestGetHashCode()
{
var vn = new Vertex(1.2f, -3.4f, 5);
var facet = new Facet(vn, null);
Assert.Equal(vn.GetHashCode(), facet.GetHashCode());
}
示例3: GetHashCodeTest1
public void GetHashCodeTest1()
{
Vertex v0 = new Vertex(new Vector3(2f, 234.4f, 30f), new Vector2(-341f, 234000f), new Vector3(9f, 24.4f, 330f), new Vector3(255f, 2.4f, 10.315f));
Vertex v1 = new Vertex(new Vector3(2f, 234.4f, 30f), new Vector2(-341f, 234000f), new Vector3(9f, 24.4f, 330f), new Vector3(255f, 2.4f, 10.315f));
Assert.IsTrue(v0.GetHashCode() == v1.GetHashCode());
}
示例4: GetHashCodeTest0
public void GetHashCodeTest0()
{
Vertex v0 = new Vertex();
Vertex v1 = new Vertex();
Assert.IsTrue(v0.GetHashCode() == v1.GetHashCode());
}