Vector Addition
Adding vectors together is one of simplest operation you can do. Take each x,y,z values and add them together. Mathematically speaking this means the following.
This is exactly what the add method does. So writing
Vector greenVector = new Vector(3, 0, 1);
Vector orangeVector = new Vector(2, 0, 3);
Vector purpleVector = greenVector.clone().add(orangeVector);
Adding vectors without cloning them beforehand means that orangeVector
in this example would actually be modified and purpleVector
is just like orangeVector
(they would point to the same value in memory).
Often this is not desired. Use clone before adding.

You can also add arbitrary many vectors together.
Vector greenVector = new Vector(3, 0, 1);
Vector orangeVector = new Vector(-2, 0, -1);
Vector yellowVector = new Vector(-3, 0, 4);
Vector purpleVector = greenVector.clone().add(orangeVector).add(yellowVector);

Vector Addition is commonly used for ,what I call, offset vectors. So when doing operations around the origin, adding back in the actual location in the world where whatever we just calculated should take place/be shown is a key step.
Last updated