VE Lua Documentation

Press F to search!

bumpFun

Definition


-- @/lua/common/mathlib.lua:1249

function bumpFun(x, peakLeftX, peakRightX, leftSlope, rightSlope, leftY, peakY, rightY, roundness)
  leftY, peakY, roundness = leftY or 0, peakY or 1, roundness or 10
  return leftY+0.5*((peakY-leftY)*(1 + sigmoid1(roundness*(x-peakLeftX), (leftSlope or 1))) +
    ((rightY or 0)-peakY)*(1+sigmoid1(roundness*(x-peakRightX), (rightSlope or 1))))
end

Callers