sigmoid1
Definition
-- @/lua/common/mathlib.lua:1245
-- symmetric around 0
function sigmoid1(x, a)
return x/((a or 1) + abs(x))
end
Callers
@/lua/common/mathlib.lua
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))))
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