minimize algorithm changes based on @WestLangley feedback here: https://github.com/mrdoob/three.js/pull/5809#issuecomment-68023021