Experiment with biomes
This commit is contained in:
@ -148,7 +148,7 @@ class PerlinNoise
|
||||
return $value;
|
||||
}
|
||||
|
||||
function random2D(float $x, float $y, ?int $size = NULL): float
|
||||
function random2D(float $x, float $y, ?int $size = null, float $multiplier = 1.0): float
|
||||
{
|
||||
if ($size === NULL) {
|
||||
$size = $this->_default_size;
|
||||
@ -167,7 +167,7 @@ class PerlinNoise
|
||||
|
||||
// $value /= 2.0;
|
||||
|
||||
return $this->sigmoid($value);
|
||||
return $this->sigmoid($value * $multiplier);
|
||||
}
|
||||
|
||||
private function sigmoid(float $t): float
|
||||
|
Reference in New Issue
Block a user