me.himanshusoni.gpxparser.modal.Bounds Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swingset3-demos Show documentation
Show all versions of swingset3-demos Show documentation
Demonstrating the abilities of the Swing UI Toolkit swingset2 and swingx aka swingset3
The newest version!
package me.himanshusoni.gpxparser.modal;
/**
* Created by Himanshu on 7/5/2015.
*/
public class Bounds {
private double minLat;
private double minLon;
private double maxLat;
private double maxLon;
public Bounds(double minlat, double maxlat, double minlon, double maxlon) {
this.minLat = minlat;
this.maxLat = maxlat;
this.minLon = minlon;
this.maxLon = maxlon;
}
public double getMinLat() {
return minLat;
}
public void setMinLat(double minLat) {
this.minLat = minLat;
}
public double getMinLon() {
return minLon;
}
public void setMinLon(double minLon) {
this.minLon = minLon;
}
public double getMaxLat() {
return maxLat;
}
public void setMaxLat(double maxLat) {
this.maxLat = maxLat;
}
public double getMaxLon() {
return maxLon;
}
public void setMaxLon(double maxLon) {
this.maxLon = maxLon;
}
// TFE, 20180201: helper method to extend bounds easily
public void extendBounds(final Bounds bounds) {
this.minLat = Math.min(minLat, bounds.minLat);
this.maxLat = Math.max(maxLat, bounds.maxLat);
this.minLon = Math.min(minLon, bounds.minLon);
this.maxLon = Math.max(maxLon, bounds.maxLon);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy