isLatLonLegal function

bool isLatLonLegal(
  1. double lat,
  2. double lon
)

Implementation

bool isLatLonLegal(double lat, double lon){
  if(lat<=90.0 && lat>=(-90.0) && lon<=180.0 && lon>=(-180.0) && (lat.abs()>0.0 || lon.abs()>0.0)){
      return true;
  }
  return false;
}