craft.noise.gradient not as advertised

n = craft.noise.gradient()
Returns a gradient in the y-axis mapped from zero to one. Zero inputs.

The gradient starts at one and counts down to zero as y increases. Is it just me or is something backward?


@RonJeffries It looks like Gradient only returns a value between 0 and 1. If the input is less than 0, then the output is 1. If the input is greater than 1, then the output is 0. If the input is between 0 and 1 then the output is 1-input.

Yes. Counts down, doc suggests strongly that it counts up.

@RonJeffries The doc says mapped from 0 to 1. Maybe it should say mapped between 0 and 1. I’m sure it takes a lot of time trying to update the docs for everything Codea does when making updates to Codea.