Skip to content

Commit

Permalink
distance filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bulgariamitko committed Apr 10, 2024
1 parent 8a96854 commit 704074c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Custom Functions/filter-by-distance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ double filterByMiles(

// Calculate distance between userLocation and userRef2
double distance = distanceInMiles(userLocation, userRef2);
distance = distance.round().toDouble();

// Check against the threshold (if provided)
if (distance > threshold) {
Expand Down

0 comments on commit 704074c

Please sign in to comment.