LiamKarlMitchell / InfiniteSky

InfiniteSky is an open-source mmorpg project, It is written in Node.JS
GNU General Public License v3.0
33 stars 42 forks source link

Optimize distance checks and quad tree. #206

Open LiamKarlMitchell opened 7 years ago

LiamKarlMitchell commented 7 years ago

Rather than doing sqrt in the loops. RangeRange outside the loop. Then compare the absolute value of the delta deltas summed to <= RangeSquared