reduce allocations via temporary var

Hi Dominic!

You can significantly reduce the load on the garbage collector by reducing the number of allocations made by new vectors; particularly in tight loops such as this.

Here it was just a simple case of utilising a temporary vector for `diff`.

I added vec2 as a dep too ;)