Skip to content

Instantly share code, notes, and snippets.

@agoldis
Last active March 30, 2018 04:15
Show Gist options
  • Save agoldis/e96d5bca0a3845f0023e38395e1fabf8 to your computer and use it in GitHub Desktop.
Save agoldis/e96d5bca0a3845f0023e38395e1fabf8 to your computer and use it in GitHub Desktop.
comment frustration - renaming
public List<PhotosCollection> getPhotosCollectionsWithinRadius(List<Locations> locationsList) {
List<PhotosCollection> photosCollection = new ArrayList<>();
final Double TWO = new Double(2);
final Double RADIUS = new Double(10);
for(Location location: locationsList) {
if((Math.pow(x, TWO) + Math.pow(y, TWO)) < Math.pow(RADIUS, TWO)) {
photosCollection.add(location.getPhotosCollection());
}
}
return photosCollection;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment