22 lines
450 B
C#
22 lines
450 B
C#
namespace omp
|
|
{
|
|
public class Point(int x, int y, int z)
|
|
{
|
|
public int x = x, y = y, z = z;
|
|
|
|
public double Distance(Point a)
|
|
{
|
|
double dx = x - a.x;
|
|
double dy = y - a.y;
|
|
double dz = z - a.z;
|
|
|
|
return Math.Sqrt(dx * dx + dy * dy + dz * dz);
|
|
}
|
|
|
|
public bool Equals(Point a)
|
|
{
|
|
return (x == a.x) && (y == a.y) && (z == a.z);
|
|
}
|
|
}
|
|
}
|