# Functions
DBScan clusters incoming points into clusters with params (eps, minPoints)
eps is clustering radius in km minPoints in minimum number of points in eps-neighborhood (density).
DistanceSpherical is a spherical (optimized) distance between two points
Result is distance in kilometers.
DistanceSphericalFast calculates spherical distance with fast cosine without sqrt and normalization to Earth radius/radians
To get real distance in km, take sqrt and multiply result by EarthR*DegreeRad
In this library eps (distance) is adjusted so that we don't need to do sqrt and multiplication.
FastCos calculates cosines from sinus.
FastSine calculates sinus approximated to parabola
Taken from: http://forum.devmaster.net/t/fast-and-accurate-sine-cosine/9648.
NewKDTree returns a new K-D tree built using the given nodes.
RegionQuery is simple way O(N) to find points in neighborhood
It is roughly equivalent to kdTree.InRange(points[i], eps, nil).
# Type aliases
EpsFunction is a function that returns eps based on point pt.