Passed
Push — master ( fd93b5...48e916 )
by Doug
40:26 queued 29:39
created

GeographicGeoidHeightGrid::getHeightAdjustment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * PHPCoord.
4
 *
5
 * @author Doug Wright
6
 */
7
declare(strict_types=1);
8
9
namespace PHPCoord\CoordinateOperation;
10
11
use PHPCoord\GeographicPoint;
12
use PHPCoord\UnitOfMeasure\Length\Length;
13
use PHPCoord\UnitOfMeasure\Length\Metre;
14
15
abstract class GeographicGeoidHeightGrid extends Grid
16
{
17
    /**
18
     * @return Metre[]
19
     */
20
    abstract public function getValues(float $x, float $y): array;
21
22 8
    public function getHeightAdjustment(GeographicPoint $location): Length
23
    {
24 8
        return $this->getValues($location->getLongitude()->asDegrees()->getValue(), $location->getLatitude()->asDegrees()->getValue())[0];
25
    }
26
}
27