use sqrmagnitude to compare distance vectors

plus cache more var references