// Longitude and latitude are in degrees. // Input Latitude must be in range [-90, 90]. // Input Longitude must be in range [-15069, 15069]. // public void ProjectPoint(double latitudeDeg, double longitudeDeg, out double x, out double y) { double latitude = MathX.InputLat(latitudeDeg, 90, "latitude"); double longitude = MathX.NormalizeLongitudeRad(MathX.InputLong(longitudeDeg, 15069, "longitude") - _projection.CentralLongitudeRad); _projection.Project(latitude, longitude, out x, out y); if (Double.IsNaN(x)) { throw new ArgumentOutOfRangeException("x"); } if (Double.IsNaN(y)) { throw new ArgumentOutOfRangeException("y"); } }
protected internal double InputLongitude(string name, double max) { return(MathX.InputLong(_parameters[name], max, name)); }