/** * Construct a rectangle from a center point (in lat-lng space) and size in * each dimension. If size.lng() is greater than 360 degrees it is clamped, * and latitudes greater than +/- 90 degrees are also clamped. So for example, * FromCenterSize((80,170),(20,20)) -> (lo=(60,150),hi=(90,-170)). * @return S2LatLngRect */ public static function fromCenterSize(S2LatLng $center, S2LatLng $size) { return self::fromPoint($center)->expanded($size->mul(0.5)); }