Fix broken analyis for negative scale
This commit is contained in:
parent
f6a46c825f
commit
944a9269df
8
init.lua
8
init.lua
@ -187,10 +187,16 @@ local analyze_noiseparams = function(noiseparams)
|
||||
-- is always 0, so we don't need to calculate it
|
||||
end
|
||||
end
|
||||
-- Offset and scale
|
||||
-- Add offset and scale to min/max value (final step)
|
||||
local min_value = np.offset + np.scale * o_min
|
||||
local max_value = np.offset + np.scale * o_max
|
||||
|
||||
-- Bring the 2 values in the correct order
|
||||
-- (min_value might be bigger for negative scale)
|
||||
if min_value > max_value then
|
||||
min_value, max_value = max_value, min_value
|
||||
end
|
||||
|
||||
-- Calculate "wavelengths"
|
||||
local axes = { "x", "y", "z" }
|
||||
local waves = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user