Convert latitude,longitude to x,y,z position on a unit sphere.
var latLonToXyz = require('latlon-to-xyz')
var pos = latLonToXyz(51.507222, -0.1275)
//[ 0.6224144446694938, 0.7826866171599899, 0.0013850579111009925 ]
latLonToXyz(lat, lon, [out])
Converts latitude,longitude to x,y,z position
lat
: Number, latitudelon
: Number, longitudeout
: vec3Returns out or new vec3
point on a unit sphere
MIT, see LICENSE.md for details.