Readability improvements of globalscripts vector.js.
commitbcd02fbbf71625346f63833066e2faebb78ac92f
authorelexis <elexis@3db68df2-c116-0410-a063-a993310a9797>
Fri, 6 Oct 2017 18:20:57 +0000 (6 18:20 +0000)
committerelexis <elexis@3db68df2-c116-0410-a063-a993310a9797>
Fri, 6 Oct 2017 18:20:57 +0000 (6 18:20 +0000)
treeaa0f6531ea7350a9a25f6a274f7c1000c9665675
parentf0e783265ea8be43792ccff7e2bcedfdbe04862e
Readability improvements of globalscripts vector.js.

In compareLength, use Math.sign to replace a ternary + isNaN check.
In distanceToSquared, Use Math.pow(distance, 2) to avoid repetition of the distance, inline its value to remove the then unneeded variables.

git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@20263 3db68df2-c116-0410-a063-a993310a9797
binaries/data/mods/public/globalscripts/vector.js