Example #1
0
        public void DisToTest()
        {
            Point3D point = new Point3D()
            {
                X = 0, Y = 0, Z = 0
            };
            Point3D endPoint = new Point3D()
            {
                X = 1, Y = 1, Z = 1
            };
            var result = point.DisTo(endPoint);

            Assert.AreEqual(result, Math.Pow(3, 0.5)); //包括Z轴
        }