changed half-distance threshold (see previous commit) to 1/16