Add Math.square to compute the square of a number without the need to repeat the...
commit0888258fe0e93a243143669683f766c9cc7c1390
authorelexis <elexis@3db68df2-c116-0410-a063-a993310a9797>
Sun, 22 Oct 2017 20:46:41 +0000 (22 20:46 +0000)
committerelexis <elexis@3db68df2-c116-0410-a063-a993310a9797>
Sun, 22 Oct 2017 20:46:41 +0000 (22 20:46 +0000)
tree40579aa460e28b9426e730271049219fa9a2d600
parent70742b279645d8ccfa909f0f6b331276fc41279e
Add Math.square to compute the square of a number without the need to repeat the term, without using the slower Math.pow.
Start unifying the euclidian distance functions instead of adding yet another helper function to the random map script library after this diff.

Differential Revision: https://code.wildfiregames.com/D969
Math.square accepted by mimo
Includes changes proposed by bb, fatherbushido

git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@20328 3db68df2-c116-0410-a063-a993310a9797
binaries/data/mods/public/globalscripts/Math.js
binaries/data/mods/public/globalscripts/vector.js
binaries/data/mods/public/gui/common/color.js
binaries/data/mods/public/simulation/ai/common-api/map-module.js
binaries/data/mods/public/simulation/ai/common-api/utils.js
binaries/data/mods/public/simulation/components/UnitAI.js
binaries/data/mods/public/simulation/components/UnitMotionFlying.js
binaries/data/mods/public/simulation/components/tests/test_Math.js