1.0.2 • Published 2 years ago
geo-points-distance v1.0.2
Usage
const isPointWithinRadius = require('geo-points-distance');
isPointWithinRadius(point, centerPoint, radius) Checks whether a point is inside of a circle or not.
// checks if 51.525/7.4575 is within a radius of 5 km from 51.5175/7.4678 //
isPointWithinRadius( { latitude: 51.525, longitude: 7.4575 }, { latitude: 51.5175, longitude: 7.4678 }, 5000 );