Skip to content

melitele/geobounds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM version Build Status Dependency Status

geobounds

Checks if point is in bounds.

Install

$ npm install --save geobounds

Usage

var geobounds = require('geobounds');
var bounds = geobounds([
  [[-1, 0], [3, 5]],
  [[100, 20], [115, 80]]
]);

bounds([1, 1]); // true
bounds([4, 1]); // false

Bounds can be dynamically extended.

var geobounds = require('geobounds');
var bounds = geobounds();

bounds.extend([0, 1]);
bounds.extend([1, 0]);

bounds.get(); // [[[0, 0], [1, 1]]]

License

MIT © Damian Krzeminski

About

Checks if point is in bounds.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors