VE Lua Documentation

Press F to search!

newLinearSmoothing

Definition


-- @/lua/common/filters.lua:423

function newLinearSmoothing(dt, inRate, outRate)
  inRate = max(inRate or 1, 1e-307)
  local data = {[false] = inRate * dt, [true] = max(outRate or inRate, 1e-307) * dt, state = 0}
  return setmetatable(data, linearSmoothing)
end

Callers

@/lua/vehicle/wheels.lua

      wheel.brakePressureDelay = newLinearSmoothing(physicsDt, brakePressureInRate, brakePressureOutRate)