Skip to main content
6 events
when toggle format what by license comment
Oct 1, 2018 at 18:55 comment added DMGregory You're welcome, even encouraged, to incorporate feedback that users offer you via comments. :)
Oct 1, 2018 at 18:44 comment added TurtleKwitty Thats a good way! I must admit that i just fiddled with a couple numbers over lunchbreak so it wasnt very in depth haha. Do oyu mind if i add your comment into my answer ?
Oct 1, 2018 at 18:42 comment added DMGregory You can improve the symmetry by doing.... movingAverage <= 0.5 ? Lerp(1, random, 2 * movingAverage) : Lerp(random, 0, 2 * movingAverage - 1) then you're effectively bracketing to low rolls when the average is high, and high rolls when the average is low, without overflow or asymmetry between low & high averages.
Oct 1, 2018 at 18:30 comment added TurtleKwitty That is a fair concern, but in this case I would not worry about it as the value is only being used in comparison to another value and not technically needing to be strictly in the [0, 1] on the output for such an operation. if that is a concern then another solution(that is much more mathematically rigourous) would be best
Oct 1, 2018 at 18:27 comment added DMGregory What if my moving average drops a little below 0.5, say 0.45, and my next roll is > 0.9524, then I get a result greater than 1. (If you clamp to 1, then you're increasing the probability of 1.0 rolls vs 0.99) Is that a concern?
Oct 1, 2018 at 17:21 history answered TurtleKwitty CC BY-SA 4.0