Closed ThatsMrTalbot closed 7 years ago
The constructor contains the line const min = options.min || -1. As zero is falsy this means min can never be set as 0.
const min = options.min || -1
https://github.com/joshforisha/fast-simplex-noise-js/blob/2412b38b2a62ca2c7db89efa71d04c4560057339/src/index.ts#L61
A possible fix would be (untested): const min = typeof options.min === "undefined" ? -1 : options.min
const min = typeof options.min === "undefined" ? -1 : options.min
Oh snap, good catch. I'll fix that in a bit. Thanks!
Released v3.2 which adds options validations.
options
Awesome! Thanks!
The constructor contains the line
const min = options.min || -1
. As zero is falsy this means min can never be set as 0.https://github.com/joshforisha/fast-simplex-noise-js/blob/2412b38b2a62ca2c7db89efa71d04c4560057339/src/index.ts#L61
A possible fix would be (untested):
const min = typeof options.min === "undefined" ? -1 : options.min