xyz-to-latlon

stable

Converts to x,y,z position on a unit sphere to latitude,longitude.

Usage

var xyzToLatLon = require('xyz-to-latlon')

//
var coord = xyzToLatLon([ 0.6224144446694938, 0.7826866171599899, 0.0013850579111009925 ])
//[51.507222, -0.1275]

API

xyzToLatLon(normalizedPosition, [out])

Converts to x,y,z position on a unit sphere to latitude,longitude.

Returns out or new vec2 with lat,lon coordinates.

License

MIT, see LICENSE.md for details.