The goal of this small library is to provide a set of useful and fast cartesian tools to work with polygons.
If you wanna go for hyperbolic coordinates like lat/long, you should use a conversion to a cartesian plane first, use this library and converts back to lat/long.
The useful utm-latlng library can be used to convert between lat/long and UTM coordinates (UTM is a cartesian plane representation of the earth).
The only gotcha is that you must use the same UTM zone for the calculus to work.
Using the lat/long coordinates directly is possible (like long been X and lat been Y), but you must keep in mind that all the measurements will be hyperbolic and some freaky things can happen.
Example:
The distance between two points in lat/long coordinates in meters is not
it's
So... Have fun ;)
PS: If you need a more sofisticated and complete library, I'd recommend using flatten-js. It's really nice and well documented. I've done this because I wanted it to be simple and fast for my pourposes (and for fun :) ). You can compare the ray_soot from flatten and mine to understand what I mean.
@author Richard Natal - Bigous