getNearbyItemCount: Added javadoc

This commit is contained in:
savsch 2024-12-24 03:48:12 +05:30
parent c3deea4849
commit 24acf3f56f
2 changed files with 8 additions and 1 deletions

View file

@ -332,6 +332,12 @@ class OkHttpJsonApiClient @Inject constructor(
throw Exception(response.message)
}
/**
* Returns the count of items in the specified area by querying Wikidata.
*
* @param queryParams: a `NearbyQueryParam` specifying the geographical area.
* @return The count of items in the specified area.
*/
@Throws(Exception::class)
fun getNearbyItemCount(
queryParams: NearbyQueryParams

View file

@ -148,7 +148,8 @@ public class NearbyPlaces {
}
// minRadius, targetRadius and maxRadius are radii in decameters
// unlike other
// unlike other radii here, which are in kilometers, to avoid looping over
// floating point values
int minRadius = 0, maxRadius = Math.round(Math.min(300f, Math.min(longGap, latGap))) * 100;
int targetRadius = maxRadius / 2;
while (minRadius < maxRadius) {