diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-01-11 17:00:00 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-01-11 17:00:00 +0100 |
| commit | 9c036c506d78c4b927a91ea65326eb09424a3795 (patch) | |
| tree | cbada5c7fe6d05a7a2373cae0f8a4f9f5ca0b6c1 /main/src/cgeo/geocaching/geopoint | |
| parent | 6a8244166bf3a3eef35024df9e0818e88e80513f (diff) | |
| download | cgeo-9c036c506d78c4b927a91ea65326eb09424a3795.zip cgeo-9c036c506d78c4b927a91ea65326eb09424a3795.tar.gz cgeo-9c036c506d78c4b927a91ea65326eb09424a3795.tar.bz2 | |
refactoring: remove unused code
Diffstat (limited to 'main/src/cgeo/geocaching/geopoint')
| -rw-r--r-- | main/src/cgeo/geocaching/geopoint/Viewport.java | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/main/src/cgeo/geocaching/geopoint/Viewport.java b/main/src/cgeo/geocaching/geopoint/Viewport.java index 4ded5d8..ba0e040 100644 --- a/main/src/cgeo/geocaching/geopoint/Viewport.java +++ b/main/src/cgeo/geocaching/geopoint/Viewport.java @@ -86,10 +86,10 @@ public final class Viewport { /** * Check whether another viewport is fully included into the current one. - * + * * @param vp * the other viewport - * @return true if the vp is fully included into this one, false otherwise + * @return true if the viewport is fully included into this one, false otherwise */ public boolean includes(final @NonNull Viewport vp) { return contains(vp.bottomLeft) && contains(vp.topRight); @@ -123,28 +123,6 @@ public final class Viewport { } /** - * Return a viewport that contains the current viewport as well as another point. - * - * @param point - * the point we want in the viewport - * @return either the same or an expanded viewport - */ - public Viewport expand(final @NonNull ICoordinates point) { - if (contains(point)) { - return this; - } - - final Geopoint coords = point.getCoords(); - final double latitude = coords.getLatitude(); - final double longitude = coords.getLongitude(); - final double latMin = Math.min(getLatitudeMin(), latitude); - final double latMax = Math.max(getLatitudeMax(), latitude); - final double lonMin = Math.min(getLongitudeMin(), longitude); - final double lonMax = Math.max(getLongitudeMax(), longitude); - return new Viewport(new Geopoint(latMin, lonMin), new Geopoint(latMax, lonMax)); - } - - /** * Return the smallest viewport containing all the given points. * * @param points |
