BiomeSelector: replace phpdoc with typehints

This commit is contained in:
Dylan K. Taylor 2020-11-01 17:09:10 +00:00
parent 12e185e3f6
commit b7690fed04

View File

@ -68,31 +68,15 @@ abstract class BiomeSelector{
} }
} }
/** public function getTemperature(float $x, float $z) : float{
* @param float $x
* @param float $z
*
* @return float
*/
public function getTemperature($x, $z){
return ($this->temperature->noise2D($x, $z, true) + 1) / 2; return ($this->temperature->noise2D($x, $z, true) + 1) / 2;
} }
/** public function getRainfall(float $x, float $z) : float{
* @param float $x
* @param float $z
*
* @return float
*/
public function getRainfall($x, $z){
return ($this->rainfall->noise2D($x, $z, true) + 1) / 2; return ($this->rainfall->noise2D($x, $z, true) + 1) / 2;
} }
/** public function pickBiome(float $x, float $z) : Biome{
* @param int $x
* @param int $z
*/
public function pickBiome($x, $z) : Biome{
$temperature = (int) ($this->getTemperature($x, $z) * 63); $temperature = (int) ($this->getTemperature($x, $z) * 63);
$rainfall = (int) ($this->getRainfall($x, $z) * 63); $rainfall = (int) ($this->getRainfall($x, $z) * 63);