define(["exports","./Cartographic-1d953166","./when-d186add7","./Check-2514d21d","./Rectangle-f841217d","./Math-7f5f2992"],(function(t,e,i,o,a,r){"use strict";function n(t){this._ellipsoid=i.u(t,a.t.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(n.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),n.mercatorAngleToGeodeticLatitude=function(t){return r.e.PI_OVER_TWO-2*Math.atan(Math.exp(-t))},n.geodeticLatitudeToMercatorAngle=function(t){t>n.MaximumLatitude?t=n.MaximumLatitude:t<-n.MaximumLatitude&&(t=-n.MaximumLatitude);var e=Math.sin(t);return.5*Math.log((1+e)/(1-e))},n.MaximumLatitude=n.mercatorAngleToGeodeticLatitude(Math.PI),n.prototype.project=function(t,o){var a=this._semimajorAxis,r=t.longitude*a,u=n.geodeticLatitudeToMercatorAngle(t.latitude)*a,d=t.height;return i.e(o)?(o.x=r,o.y=u,o.z=d,o):new e.t(r,u,d)},n.prototype.unproject=function(t,a){if(!i.e(t))throw new o.t("cartesian is required");var r=this._oneOverSemimajorAxis,u=t.x*r,d=n.mercatorAngleToGeodeticLatitude(t.y*r),s=t.z;return i.e(a)?(a.longitude=u,a.latitude=d,a.height=s,a):new e.t$1(u,d,s)},t.t=n}));
