-- @/lua/common/filters.lua:561
function newLineFitting(window, weight, bias, scale)
if not scale or scale <= 0 then scale = 1000 end
weight, bias = weight or 0, bias or 0
local decay = 1 - 2 / (window - 1)
local data = {weight = weight, weightStartingValue = weight, bias = bias, biasStartingValue = bias, decay = decay, decayStartingValue = decay, scale = scale,
[1] = 1 / scale, [2] = 0, [3] = 0, [4] = 0, [5] = 0}
return setmetatable(data, lineFitting)
end