本文整理汇总了C#中Point3.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Point3.Equals方法的具体用法?C# Point3.Equals怎么用?C# Point3.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point3
的用法示例。
在下文中一共展示了Point3.Equals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: exemplo2
static void exemplo2()
{
Point3 p1 = new Point3(5, 7, 11);
Point3 p2 = new Point3(5, 7, 11);
Console.WriteLine("{0}.Equals({1}) = {2}", p1, p2, p1.Equals(p2));
}
示例2: VoxelListener_OnVoxelDestroyed
void VoxelListener_OnVoxelDestroyed(Point3 voxelID)
{
if (voxelID.Equals(VoxelID))
{
GetRootComponent().Die();
}
}
示例3: equal_coordtriple
public void equal_coordtriple() {
var a = new Point3(1, 2, 0);
var b = new Point3(3, 4, 1);
var c = new Point3(3, 4, 1);
ICoordinateTriple<double> nil = null;
Assert.False(a.Equals((ICoordinateTriple<double>)b));
Assert.False(a.Equals((ICoordinateTriple<double>)c));
Assert.False(b.Equals((ICoordinateTriple<double>)a));
Assert.True(b.Equals((ICoordinateTriple<double>)c));
Assert.False(c.Equals((ICoordinateTriple<double>)a));
Assert.True(c.Equals((ICoordinateTriple<double>)b));
Assert.False(a.Equals(nil));
}
示例4: equal_object
public void equal_object() {
var a = new Point3(1, 2, 0);
var b = new Point3(3, 4, 9);
var c = new Point3(3, 4, 9);
Assert.False(a.Equals((object)(new Vector3(b))));
Assert.False(a.Equals((object)(new Vector3(c))));
Assert.False(((object)b).Equals(a));
Assert.True(((object)b).Equals(new Vector3(c)));
Assert.False(c.Equals((object)a));
Assert.True(c.Equals((object)b));
}
示例5: equal_typed
public void equal_typed() {
var a = new Point3(1, 2, 9);
var b = new Point3(3, 4, 6);
var c = new Point3(3, 4, 6);
Assert.False(a.Equals(b));
Assert.False(a.Equals(c));
Assert.False(b.Equals(a));
Assert.True(b.Equals(c));
Assert.False(c.Equals(a));
Assert.True(c.Equals(b));
}