It really overloads the + operator.
what does it mean? ok it's simple:
if you have this:
int i = 10; int j = 20; int x = i + j;
In this example, x will be 30, because C # knows if we use integers and use + that we need to take the sum.
But now you are working with Vectors. A 3d vector has 3 meanings: X, Y, and Z. If you want a sum of 2 vectors to work well? it looks like
v1.X + v2.Y and v1.Y + v2.Z and v1.Z + v2.X
or should C # do it like this:
v1.X + v1.Y and v1.Z + v2.X and v2.Y + v2.Z
When overloading an operator, you determine how the + operator should be implemented when using vectors. In our case, it is:
v1.X + v2.X and v1.Y + v2.Y and v1.Z + v2.Z
not so difficult;)
source share