1
0
mirror of https://github.com/t-affeldt/regional_weather.git synced 2025-06-28 14:46:00 +02:00

2 Commits

Author SHA1 Message Date
9ecf5b6520 Merge remote-tracking branch 'upstream/master' 2025-03-20 12:46:30 +01:00
caeff69f27 Change map_range behavior 2023-12-20 23:31:34 +01:00

View File

@ -14,6 +14,10 @@ end
-- maps range of 0 to 1 to any other range -- maps range of 0 to 1 to any other range
local function map_range(val, low, high) local function map_range(val, low, high)
-- NALC modif
-- local cal_val = math.min(math.max(val, 0), 1)
-- local range = high - low
-- return low + (cal_val * range)
return val * (high - low) + low return val * (high - low) + low
end end