phpdoc: populate missing parameter typeinfo

This commit is contained in:
Dylan K. Taylor
2020-01-11 21:53:24 +00:00
parent c329ff7d4f
commit 17720041a3
20 changed files with 260 additions and 3 deletions

View File

@ -83,6 +83,12 @@ class Simplex extends Perlin{
protected $offsetW;
/**
* @param Random $random
* @param int $octaves
* @param float $persistence
* @param float $expansion
*/
public function __construct(Random $random, $octaves, $persistence, $expansion = 1){
parent::__construct($random, $octaves, $persistence, $expansion);
$this->offsetW = $random->nextFloat() * 256;
@ -100,14 +106,38 @@ class Simplex extends Perlin{
self::$G44 = self::$G4 * 4.0 - 1.0;
}
/**
* @param int[] $g
* @param float $x
* @param float $y
*
* @return float
*/
protected static function dot2D($g, $x, $y){
return $g[0] * $x + $g[1] * $y;
}
/**
* @param int[] $g
* @param float $x
* @param float $y
* @param float $z
*
* @return float
*/
protected static function dot3D($g, $x, $y, $z){
return $g[0] * $x + $g[1] * $y + $g[2] * $z;
}
/**
* @param int[] $g
* @param float $x
* @param float $y
* @param float $z
* @param float $w
*
* @return float
*/
protected static function dot4D($g, $x, $y, $z, $w){
return $g[0] * $x + $g[1] * $y + $g[2] * $z + $g[3] * $w;
}