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

InverseVincentyBearing::getDistance()   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 "Inverse 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
/**
15
 * Value object for a "Direct Vincenty" bearing calculation result.
16
 *
17
 * @author   Marcus Jaschen <[email protected]>
18
 * @license  https://opensource.org/licenses/MIT
19
 * @link     https://github.com/mjaschen/phpgeo
20
 */
21
class InverseVincentyBearing
22
{
23
    /**
24
     * @var float
25
     */
26
    private $distance;
27
28
    /**
29
     * @var float
30
     */
31
    private $bearingInitial;
32
33
    /**
34
     * @var float
35
     */
36
    private $bearingFinal;
37
38
    /**
39
     * InverseVincentyBearing constructor.
40
     *
41
     * @param float $distance
42
     * @param float $bearingInitial
43
     * @param float $bearingFinal
44
     */
45
    public function __construct(float $distance, float $bearingInitial, float $bearingFinal)
46
    {
47
        $this->distance       = $distance;
48
        $this->bearingInitial = $bearingInitial;
49
        $this->bearingFinal   = $bearingFinal;
50
    }
51
52
    /**
53
     * @return float
54
     */
55
    public function getDistance(): float
56
    {
57
        return $this->distance;
58
    }
59
60
    /**
61
     * @return float
62
     */
63
    public function getBearingInitial(): float
64
    {
65
        return $this->bearingInitial;
66
    }
67
68
    /**
69
     * @return float
70
     */
71
    public function getBearingFinal(): float
72
    {
73
        return $this->bearingFinal;
74
    }
75
}
76