"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("geolib"),t=require("@turf/circle"),r=require("../../utils/toMapboxCoords.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(t),n=function(t,r){var o=e.getDistance(t,r);return e.convertDistance(o,"mi")};exports.EDGE_TOLERANCE_PIXELS=5,exports.createCircleGeoJSON=function(e,t){var o=r.toMapboxCoords(e);return i.default(o,t,{units:"miles",steps:64})},exports.getDistanceInMiles=n,exports.getPixelToleranceInMiles=function(e,t){var o=r.toMapboxCoords(t),i=e.project(o),u={x:i.x+5,y:i.y},s=e.unproject([u.x,u.y]);return n({latitude:t.latitude,longitude:t.longitude},{latitude:s.lat,longitude:s.lng})},exports.isInsideCircle=function(e,t,r){return e<t-r},exports.isNearCircleEdge=function(e,t,r){return Math.abs(e-t)<=r};
//# sourceMappingURL=radius-geometry.js.map
