29 private float $eyeHeight;
31 public function __construct(
32 private float $height,
34 ?
float $eyeHeight =
null
36 $this->eyeHeight = $eyeHeight ?? min($this->height / 2 + 0.1, $this->height);
39 public function getHeight() :
float{
return $this->height; }
41 public function getWidth() :
float{
return $this->width; }
43 public function getEyeHeight() :
float{
return $this->eyeHeight; }
45 public function scale(
float $newScale) :
self{
47 $this->height * $newScale,
48 $this->width * $newScale,
49 $this->eyeHeight * $newScale