protected distancePoints ( |
||
$a | ||
$b | ||
리턴 | float |
protected function distancePoints(Point $a, Point $b)
{
$diffX = $b->getX() - $a->getX();
$diffY = $b->getY() - $a->getY();
return sqrt(pow($diffX, 2) + pow($diffY, 2));
}