When passing thresholds([0.5]) to contourDensity, one would expect the returned thresholds to be [0.5], but instead we get 0.5 * 2^-2k = 1/32 (with the default cellSize k=2).
This fixes the logic so that the thresholds are respected. Unfortunately it is a breaking change or any user who has manually set those thresholds.
When passing thresholds([0.5]) to contourDensity, one would expect the returned thresholds to be [0.5], but instead we get 0.5 * 2^-2k = 1/32 (with the default cellSize k=2).
This fixes the logic so that the thresholds are respected. Unfortunately it is a breaking change or any user who has manually set those thresholds.