Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

craft.noise.gradient not as advertised

in Bugs Posts: 496

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?

Thanks!

Comments

  • dave1707dave1707 Mod
    Posts: 8,193

    @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.

  • Posts: 496

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

  • dave1707dave1707 Mod
    Posts: 8,193

    @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.

Sign In or Register to comment.