Completed
Push — master ( 4f7719...080a41 )
by Marcus
06:01
created

DirectVincentyBearing::getBearingFinal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Value object for a "Direct Vincenty" bearing calculation result.
6
 *
7
 * @author   Marcus Jaschen <[email protected]>
8
 * @license  https://opensource.org/licenses/MIT
9
 * @link     https://github.com/mjaschen/phpgeo
10
 */
11
12
namespace Location\Bearing;
13
14
use Location\Coordinate;
15
16
/**
17
 * Value object for a "Direct Vincenty" bearing calculation result.
18
 *
19
 * @author   Marcus Jaschen <[email protected]>
20
 * @license  https://opensource.org/licenses/MIT
21
 * @link     https://github.com/mjaschen/phpgeo
22
 */
23
class DirectVincentyBearing
24
{
25
    /**
26
     * @var Coordinate
27
     */
28
    private $destination;
29
30
    /**
31
     * @var float
32
     */
33
    private $bearingFinal;
34
35
    /**
36
     * Bearing constructor.
37
     *
38
     * @param Coordinate $destination
39
     * @param float $bearingFinal
40
     */
41
    public function __construct(Coordinate $destination, float $bearingFinal)
42
    {
43
        $this->destination  = $destination;
44
        $this->bearingFinal = $bearingFinal;
45
    }
46
47
    /**
48
     * @return Coordinate
49
     */
50
    public function getDestination(): Coordinate
51
    {
52
        return $this->destination;
53
    }
54
55
    /**
56
     * @return float
57
     */
58
    public function getBearingFinal(): float
59
    {
60
        return $this->bearingFinal;
61
    }
62
}
63