It's often the case where we might want to show a value/distribution over a function as steadily increasing. One annoying thing is that each point is calculated separately.
One way of doing this is to have an optional second parameter that accepts a {X:... Y:...} value of a previous value to condition on.
For example,
myFunction(newX:numeric, conditional:numeric?) = {
timeChange = 30 to 50
if (conditional) then
diff = (newX - conditional.x)
conditional.y + (diff * timeChange)
else then newX * timeChange
}
Description of suggestion or shortcoming:
It's often the case where we might want to show a value/distribution over a function as steadily increasing. One annoying thing is that each point is calculated separately.
One way of doing this is to have an optional second parameter that accepts a {X:... Y:...} value of a previous value to condition on.
For example,