Java Number Range Check inRange(double lat, double lon)

Here you can find the source of inRange(double lat, double lon)

Description

in Range

License

Apache License

Declaration

private static boolean inRange(double lat, double lon) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static boolean inRange(double lat, double lon) {
        if (Double.compare(lat, 90) <= 0 && Double.compare(lat, -90) >= 0 && Double.compare(lon, 180) <= 0
                && Double.compare(lon, -180) >= 0) {
            return true;
        }//from   www .  jav a2s  . co  m
        return false;
    }
}

Related

  1. inRange(double query, double min, double max)
  2. inRange(double value, double lower, double upper)
  3. inRange(double value, double min, double max)
  4. inRange(double value, double min, double max)