🚿 docblocks (WIP)

This commit is contained in:
codemasher
2021-11-18 13:32:46 +01:00
parent f7e5e2e806
commit 6a5be44ea4
18 changed files with 126 additions and 20 deletions
+12
View File
@@ -24,12 +24,18 @@ final class FinderPattern extends ResultPoint{
private int $count;
/**
*
*/
public function __construct(float $posX, float $posY, float $estimatedModuleSize, int $count = null){
parent::__construct($posX, $posY, $estimatedModuleSize);
$this->count = $count ?? 1;
}
/**
*
*/
public function getCount():int{
return $this->count;
}
@@ -66,6 +72,9 @@ final class FinderPattern extends ResultPoint{
);
}
/**
*
*/
private static function squaredDistance(float $aX, float $aY, float $bX, float $bY):float{
$xDiff = $aX - $bX;
$yDiff = $aY - $bY;
@@ -73,6 +82,9 @@ final class FinderPattern extends ResultPoint{
return $xDiff * $xDiff + $yDiff * $yDiff;
}
/**
*
*/
public static function distance(float $aX, float $aY, float $bX, float $bY):float{
return sqrt(self::squaredDistance($aX, $aY, $bX, $bY));
}