vadd method
Vector addition
Implementation
Vec3 vadd(Vec3 vector, [Vec3? target]){
if (target != null) {
target.x = vector.x + x;
target.y = vector.y + y;
target.z = vector.z + z;
return target;
} else {
return Vec3(x + vector.x, y + vector.y, z + vector.z);
}
}