Just the first line needs to be changed so `mid` will be a new `Cartesian3`. The lines after that are fine because it will modify the new `Cartesian3` that mid refers to.