1 | <?php |
||
14 | class Bounds |
||
15 | { |
||
16 | /** |
||
17 | * @var Point |
||
18 | */ |
||
19 | protected $northWest; |
||
20 | |||
21 | /** |
||
22 | * @var Point |
||
23 | */ |
||
24 | protected $southEast; |
||
25 | |||
26 | /** |
||
27 | * @param Point $northWest |
||
28 | * @param Point $southEast |
||
29 | */ |
||
30 | public function __construct(Point $northWest, Point $southEast) |
||
35 | |||
36 | /** |
||
37 | * Getter |
||
38 | * |
||
39 | * @return Point |
||
40 | */ |
||
41 | public function getNorthWest(): Point |
||
45 | |||
46 | /** |
||
47 | * Getter |
||
48 | * |
||
49 | * @return Point |
||
50 | */ |
||
51 | public function getSouthEast(): Point |
||
55 | |||
56 | /** |
||
57 | * @return float |
||
58 | */ |
||
59 | public function getNorth(): float |
||
63 | |||
64 | /** |
||
65 | * @return float |
||
66 | */ |
||
67 | public function getSouth(): float |
||
71 | |||
72 | /** |
||
73 | * @return float |
||
74 | */ |
||
75 | public function getWest(): float |
||
79 | |||
80 | /** |
||
81 | * @return float |
||
82 | */ |
||
83 | public function getEast(): float |
||
87 | |||
88 | /** |
||
89 | * Calculates the center of this bounds object and returns it as a |
||
90 | * Point instance. |
||
91 | * |
||
92 | * @return Point |
||
93 | * @throws InvalidArgumentException |
||
94 | */ |
||
95 | public function getCenter(): Point |
||
101 | |||
102 | /** |
||
103 | * @return float |
||
104 | */ |
||
105 | protected function getCenterLng(): float |
||
125 | } |
||
126 |