mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
Build with Java 16 for the time being
This commit is contained in:
1 parent
1c7d45bb81
commit
bb66246fb6
7 files changed
+13
-13
No files matched your search
@@ -59,7 +59,7 @@ public class NormalDistributionEngine extends RtpEngine {
|
||||
*/
|
||||
private static float generateNormallyDistributedRadius(float mean, float standardDeviation,
|
||||
float spawnRadius, float maxRadius) {
|
||||
double value = new Random().nextGaussian(mean, standardDeviation) * maxRadius;
|
||||
double value = (new Random().nextGaussian() * mean + standardDeviation) * maxRadius;
|
||||
if (value < spawnRadius || value > maxRadius) {
|
||||
return generateNormallyDistributedRadius(mean, standardDeviation, spawnRadius, maxRadius);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user