MCPcopy Create free account
hub / github.com/jipegit/OSXAuditor / d3_geo_cartesianNormalize

Function d3_geo_cartesianNormalize

d3-3.2.8/d3.js:2259–2264  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

2257 return [ vector[0] * k, vector[1] * k, vector[2] * k ];
2258 }
2259 function d3_geo_cartesianNormalize(d) {
2260 var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
2261 d[0] /= l;
2262 d[1] /= l;
2263 d[2] /= l;
2264 }
2265 function d3_geo_spherical(cartesian) {
2266 return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ];
2267 }

Callers 3

linePointFunction · 0.85
d3_geo_pointInPolygonFunction · 0.85
d3_geo_circleAngleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected