Passed
Push — master ( 65e631...545eb8 )
by Roma
03:28
created

Helpers::radiusFromCoordinates()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Hotrush\Polarcy;
4
5
class Helpers
6
{
7
    /**
8
     * @param Point $point1
9
     * @param Point $point2
10
     * @return float
11
     */
12
    public static function distanceBetweenPoints(Point $point1, Point $point2)
13
    {
14
        return sqrt(pow($point1->x() - $point2->x(), 2) + pow($point1->y() - $point2->y(), 2));
15
    }
16
}