Skip to content

Commit

Permalink
Update NodePosition.php
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell authored Oct 12, 2023
1 parent b317145 commit 4f842f1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Dom/NodePosition.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,23 @@ public function getY(): float
return $this->y;
}

public function getWidth(): int
public function getWidth(): float
{
return (int) $this->width;
return $this->width;
}

public function getHeight(): int
public function getHeight(): float
{
return (int) $this->height;
return $this->height;
}

public function getCenterX(): int
public function getCenterX(): float
{
return (int) ($this->x + ($this->width / 2));
return $this->x + ($this->width / 2);
}

public function getCenterY(): int
public function getCenterY(): float
{
return (int) ($this->y + ($this->height / 2));
return $this->y + ($this->height / 2);
}
}

0 comments on commit 4f842f1

Please sign in to comment.