Must be an obvious answer I’m missing, but is there an established name for this function? Or a simpler alternative?
```
x < 0
? a / (1.0 - x)
: a * (1.0 + x)
```
Discussion
Must be an obvious answer I’m missing, but is there an established name for this function? Or a simpler alternative?
```
x < 0
? a / (1.0 - x)
: a * (1.0 + x)
```
@glocq All the properties! I mean is there like a standard Math.something function that does this exact thing, or some well known function like smoothstep that everyone uses but I’ve missed?
@jonikorpi I'd personally try multiplying by x^2 - for example and limit the range to 0.01=>3, though you might want to try different exponents to get the curve to feel nice.
@toerror No I mean like an alternative that does the exact same thing. Like some standard Math.something function or some demoscene one like smoothstep that everyone uses but I’ve missed?
@jonikorpi Why do you need to go from negative to positive though, when there's the range 0. => 1 that also does division and maintains an intact curve without the need for switching when it exceeds 1 and becomes an amplifier?
@jonikorpi Numbers 0=>1 attenuate a signal they are multiplied with, while numbers 1=>inf are amplifiers when multiplied with a signal.
@jonikorpi I don't know about an established name. As for a "simpler alternative", I guess it depends on what properties of the function you're interested in (how smooth should the function be, should f(x) be exactly equal to x for x >= 1 or just asymptotically, etc.)