Code style fixes

This commit is contained in:
Tobias Schönberg 2017-05-28 18:39:10 +02:00
parent a62bfd2001
commit 0a86a31203
3 changed files with 7 additions and 5 deletions

View file

@ -4,7 +4,7 @@ public class LatLng {
public final double latitude;
public final double longitude;
public final float accuracy;
private final float accuracy;
/** Accepts latitude and longitude.
* North and South values are cut off at 90°

View file

@ -69,7 +69,8 @@ public class LocationServiceManager implements LocationListener {
double currentLatitude = location.getLatitude();
double currentLongitude = location.getLongitude();
latestLocationAccuracy = location.getAccuracy();
Timber.d("Latitude: %f Longitude: %f Accuracy %f", currentLatitude, currentLongitude, latestLocationAccuracy);
Timber.d("Latitude: %f Longitude: %f Accuracy %f",
currentLatitude, currentLongitude, latestLocationAccuracy);
latestLocation = new LatLng(currentLatitude, currentLongitude, latestLocationAccuracy);
}

View file

@ -146,11 +146,12 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
*
* @return List List of LatLng points of the circle.
*/
public List<LatLng> createCircleArray(double centerLat, double centerLong, float radius, int nodes) {
public List<LatLng> createCircleArray(
double centerLat, double centerLong, float radius, int nodes) {
List<LatLng> circle = new ArrayList<>();
float radiusKilometer = radius / 1000;
double radiusLong = radiusKilometer /
(111.320 * Math.cos(centerLat * Math.PI / 180));
double radiusLong = radiusKilometer
/ (111.320 * Math.cos(centerLat * Math.PI / 180));
double radiusLat = radiusKilometer / 110.574;
for (int i = 0; i < nodes; i++) {