sure if this is 'correct' but so far in testing it's been working pretty well. This also exposes a new 'Nearest' value, to determine how many nearby particles are taken into account when determining density. A greater number is more accurate, but slower.