예제 #1
0
        static void Main(string[] args)
        {
            _3DClass1 v1 = new _3DClass1(4, 2, 3);
            _3DClass1 v2 = new _3DClass1(5, 6, 7);
            _3DClass1 v3 = v1.addVector(v2);

            Debug.WriteLine("Square result is +" + v1.Sqresult());
            Debug.WriteLine("Vector plus result is +" + v3);
        }
예제 #2
0
        public _3DClass1 addVector(_3DClass1 otherVector)
        {
            var resultingVector = new _3DClass1(this.X + otherVector.X, this.Y + otherVector.Y, this.Z + otherVector.Z);

            return(resultingVector);
        }