1 | <?php |
||
12 | class Bounds |
||
13 | { |
||
14 | /** |
||
15 | * @var Coordinate |
||
16 | */ |
||
17 | protected $northWest; |
||
18 | |||
19 | /** |
||
20 | * @var Coordinate |
||
21 | */ |
||
22 | protected $southEast; |
||
23 | |||
24 | /** |
||
25 | * @param Coordinate $northWest |
||
26 | * @param Coordinate $southEast |
||
27 | */ |
||
28 | public function __construct(Coordinate $northWest, Coordinate $southEast) |
||
33 | |||
34 | /** |
||
35 | * Getter |
||
36 | * |
||
37 | * @return Coordinate |
||
38 | */ |
||
39 | public function getNorthWest(): Coordinate |
||
43 | |||
44 | /** |
||
45 | * Getter |
||
46 | * |
||
47 | * @return Coordinate |
||
48 | */ |
||
49 | public function getSouthEast(): Coordinate |
||
53 | |||
54 | /** |
||
55 | * @return float |
||
56 | */ |
||
57 | public function getNorth(): float |
||
61 | |||
62 | /** |
||
63 | * @return float |
||
64 | */ |
||
65 | public function getSouth(): float |
||
69 | |||
70 | /** |
||
71 | * @return float |
||
72 | */ |
||
73 | public function getWest(): float |
||
77 | |||
78 | /** |
||
79 | * @return float |
||
80 | */ |
||
81 | public function getEast(): float |
||
85 | |||
86 | /** |
||
87 | * Calculates the center of this bounds object and returns it as a |
||
88 | * Coordinate instance. |
||
89 | * |
||
90 | * @return Coordinate |
||
91 | * @throws \InvalidArgumentException |
||
92 | */ |
||
93 | public function getCenter(): Coordinate |
||
99 | |||
100 | /** |
||
101 | * @return float |
||
102 | */ |
||
103 | protected function getCenterLng(): float |
||
123 | } |
||
124 |