Carpet

Carpet

2M Downloads

Change Implementation of nextGauBian()

ClancyWalters opened this issue ยท 1 comments

commented

Currently, extreme behaviours use this method to approximate rare events happening in mc. The implementation however doesn't respect the underlying gaussian implementation and instead simply uses a flat distribution capped between -8 and 8:

random.nextDouble();
return 16.0D * random.nextDouble() - 8.0D;

I propose changing this to instead use a normal distribution with a larger standard deviation. This will more closely mimic the vanilla implementation:

double standardeviation = 6;
return random.nextGaussian() * standardeviation;

Additionally, it would be extremely useful to be able to modify the standard deviation value.

commented

Nvm, this is invalid as java's nextGaussian() implementation is bounded from -8 to 8. (Thanks boyenn xD)