Skip to content

Commit

Permalink
docs: description for contains method
Browse files Browse the repository at this point in the history
  • Loading branch information
ishafiul committed Oct 3, 2024
1 parent cce99d0 commit 4f8aa72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions maplibre_gl_platform_interface/lib/src/location.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ class LatLngBounds {
return <dynamic>[southwest.toJson(), northeast.toJson()];
}

/// Determines whether a given geographical point (`LatLng`) is within the
/// bounds defined by two other geographical points: `southwest` (lower-left corner)
/// and `northeast` (upper-right corner).
///
bool contains(LatLng point) {
final isLatitudeInBounds = point.latitude >= southwest.latitude &&
point.latitude <= northeast.latitude;
Expand Down

0 comments on commit 4f8aa72

Please sign in to comment.