mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-26 06:18:09 +00:00
🚿 docblocks (WIP)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user