コード例 #1
0
        public static int DistanceSquared(SignedVector3i value1, SignedVector3i value2)
        {
            int x = value1.X - value2.X;
            int y = value1.Y - value2.Y;
            int z = value1.Z - value2.Z;

            return((x * x) + (y * y) + (z * z));
        }
コード例 #2
0
 public override bool Equals(object obj)
 {
     if (obj is SignedVector3i)
     {
         SignedVector3i other = (SignedVector3i)obj;
         return(this.X == other.X && this.Y == other.Y && this.Z == other.Z);
     }
     return(base.Equals(obj));
 }
 internal Vector3i add(SignedVector3i sv)
 {
     return(new Vector3i(X + (uint)sv.X, Y + (uint)sv.Y, Z + (uint)sv.Z));
 }