コード例 #1
0
ファイル: PointTest.cs プロジェクト: iainsproat/SharpFE
        public void Can_calculate_vector_to_another_point()
        {
            CartesianPoint SUT = new CartesianPoint(3, 4, 5);
            CartesianPoint other = new CartesianPoint(5, 4, 3);

            GeometricVector result = SUT.VectorTo(other);
            Assert.AreEqual(2, result.X);
            Assert.AreEqual(0, result.Y);
            Assert.AreEqual(-2, result.Z);
        }
コード例 #2
0
ファイル: PointTest.cs プロジェクト: xiaoxiongnpu/SharpFE
        public void Can_calculate_vector_to_another_point()
        {
            CartesianPoint SUT   = new CartesianPoint(3, 4, 5);
            CartesianPoint other = new CartesianPoint(5, 4, 3);

            GeometricVector result = SUT.VectorTo(other);

            Assert.AreEqual(2, result.X);
            Assert.AreEqual(0, result.Y);
            Assert.AreEqual(-2, result.Z);
        }