Compare commits

...

5 Commits

Author SHA1 Message Date
Wuzzy a5ea57fda3 Version 1.0.3 2022-05-12 13:09:42 +02:00
Wuzzy e959f60ce1 Fix German translation of 'defaults' flag 2022-05-12 12:38:45 +02:00
Wuzzy 320905826b Fix wrong analysis if persistence < 0 and absvalue 2022-05-12 12:37:53 +02:00
Wuzzy e84f99166d Version 1.0.2 2022-05-12 12:02:54 +02:00
Wuzzy bff6494249 Fix bad noise analysis if persistence < 0 2022-05-12 12:01:19 +02:00
3 changed files with 26 additions and 6 deletions

View File

@ -1,6 +1,6 @@
# Perlin Explorer [`perlin_explorer`]
Version: 1.0.1
Version: 1.0.3
Perlin Explorer is a mod for Minetest to allow to test and experiment around with Perlin noises.

View File

@ -346,11 +346,31 @@ local analyze_noiseparams = function(noiseparams)
local o_min, o_max = 0, 0
for o=1, np.octaves do
local exp = o-1
o_max = o_max + (1 * np.persistence ^ exp)
-- Calculate the two possible extreme values
-- with the octave value being either at 1 or -1.
local limit1 = (1 * np.persistence ^ exp)
local limit2
if not is_absolute then
o_min = o_min + (- 1 * np.persistence ^ exp)
-- Note: If absvalue flag is set, the sum of the octaves
-- is always 0, so we don't need to calculate it
limit2 = (-1 * np.persistence ^ exp)
else
-- If absvalue is set, one of the
-- limits is always 0 because we
-- can't get lower.
limit2 = 0
end
-- To add to the maximum, pick the higher value
if limit1 > limit2 then
o_max = o_max + limit1
else
o_max = o_max + limit2
end
-- To add to the minimum, pick the LOWER value
if limit1 > limit2 then
o_min = o_min + limit2
else
o_min = o_min + limit1
end
end
-- Add offset and scale to min/max value (final step)

View File

@ -94,7 +94,7 @@ Z Spread=Z-Ausbreitung
Octaves=Oktaven
Persistence=Persistenz
Lacunarity=Lückenhaftigkeit
defaults=default
defaults=defaults
eased=eased
absvalue=absvalue
Analyze=Analysieren