Skip to content

Commit

Permalink
Update src/geo/lng_lat_bounds.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Nov 6, 2019
1 parent dced5e3 commit 71986fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/geo/lng_lat_bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class LngLatBounds {
* @returns {boolean} True if the point is within the bounding box.
*/
contains(lnglat: LngLatLike) {
lnglat = lnglat instanceof LngLat ? new LngLat(lnglat.lng, lnglat.lat) : LngLat.convert(lnglat);
lnglat = LngLat.convert(lnglat);

const containsLatitude = this._sw.lat <= lnglat.lat && lnglat.lat <= this._ne.lat;
let containsLongitude = this._sw.lng <= lnglat.lng && lnglat.lng <= this._ne.lng;
Expand Down

0 comments on commit 71986fb

Please sign in to comment.