Example #1
0
        public static TVector3D operator *(TVector3D a, int y)
        {
            TVector3D c = new TVector3D();

            c.vector_1_Cordinate[0] = a.vector_1_Cordinate[0] * a.vector_2_Cordinate[0] + a.vector_1_Cordinate[1] * a.vector_2_Cordinate[1] + a.vector_3_Cordinate[0] * a.vector_3_Cordinate[1];

            return(c);
        }
Example #2
0
        public static TVector3D operator -(TVector3D a)
        {
            TVector3D c = new TVector3D();

            c.vector_sum_Cordinate[0] = a.vector_1_Cordinate[0] - a.vector_2_Cordinate[0];
            c.vector_sum_Cordinate[1] = a.vector_1_Cordinate[1] - a.vector_2_Cordinate[1];
            c.vector_sum_Cordinate[0] = a.vector_3_Cordinate[0] - a.vector_3_Cordinate[1];

            return(c);
        }
Example #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Введіть дві коодинати для двох векторів:");

            TVector2D vectors_2 = new TVector2D();

            double vector_AB = 0;

            vector_AB = vectors_2.VectorLength1(vector_AB);


            double vector_CD = 0;

            vector_CD = vectors_2.VectorLength2(vector_CD);


            Console.WriteLine(vectors_2);

            Console.WriteLine("{0}", vectors_2.ComparisonOfVectors(vector_AB, vector_CD));

            Console.WriteLine("Введіть три коодинати для двох векторів:");

            TVector3D vectors_3 = new TVector3D();

            vector_AB = 0;
            vector_AB = vectors_3.VectorLength1(vector_AB);

            vector_CD = 0;
            vector_CD = vectors_3.VectorLength2(vector_CD);


            Console.WriteLine(vectors_3);

            Console.WriteLine("{0}", vectors_3.ComparisonOfVectors(vector_AB, vector_CD));


            Console.ReadKey();
        }
Example #4
0
 public TVector3D(TVector3D vectors)
 {
     vector_3_Cordinate = vectors.vector_3_Cordinate;
 }