LatLon constructor

LatLon(
  1. double lat,
  2. double lon
)

Generative constructor

Implementation

LatLon(double lat, double lon)
{
  if ( !isValidLat(lat) ) {
    throw new IllegalArgumentException("Invalid lat value, got ${lat}");
  }
  if ( !isValidLon(lon) ) {
    throw new IllegalArgumentException("Invalid lon value, got ${lon}");
  }

  this.lat = lat;
  this.lon = lon;
}