8000 ProjectsGroup/Vector at master · VanHakobyan/ProjectsGroup · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History

Vector

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Vector +,-,* overloading


A vector space (also called a linear space) is a collection of objects called vectors, which may be added together and multiplied ("scaled") by numbers, called scalars in this context. Scalars are often taken to be real numbers, but there are also vector spaces with scalar multiplication by complex numbers, rational numbers, or generally any field. The operations of vector addition and scalar multiplication must satisfy certain requirements, called axioms, listed below.

Euclidean vectors are an example of a vector space. They represent physical quantities such as forces: any two forces (of the same type) can be added to yield a third, and the multiplication of a force vector by a real multiplier is another force vector. In the same vein, but in a more geometric sense, vectors representing displacements in the plane or in three-dimensional space also form vector spaces. Vectors in vector spaces do not necessarily have to be arrow-like objects as they appear in the mentioned examples: vectors are regarded as abstract mathematical objects with particular properties, which in some cases can be visualized as arrows.

public vector(vector v1,vector v2)
{
    this.v1.p1 = v1.p1;
    this.v1.p2 = v1.p2;
    this.v2.p1 = v2.p1;
    this.v2.p2 = v2.p2;


}

public vector(int v, int v3)
{
    this.v = v;
    this.v3 = v3;
}

public static vector operator +(vector vector1, vector vector2)
{
        return new vector(vector1.v1, vector2.v2);
}
0