Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local testparam = {
offset = 0,
scale = 1,
spread = {x=80, y=80, z=80},
seed = 1337,
octaves = 6,
persist = 0.6
}
perlin_map = minetest.get_perlin_map(testparam, map_lengths_xyz):get2dMap_flat(minp)
pi = perlin_map[perlin_index]
if pi < -1 or pi > 1 then
minetest.chat_send_player("singleplayer", pi)
end
This is a snipped of the code I use (based on the example from PerlinNoiseMap, which has also a bug) and I get a lot of values below -1 or above 1, lots of them more than +/-1.5.
As you can see on the screenshot lots of the numbers are equal and it looks like they have a pattern. Is this a bug?