MCPcopy Create free account
hub / github.com/microsoft/SandDance / getSunlightDirection

Function getSunlightDirection

docs/app/js/sanddance-app.js:95796–95804  ·  view source on GitHub ↗
(timestamp, latitude, longitude)

Source from the content-addressed store, hash-verified

95794 };
95795}
95796function getSunlightDirection(timestamp, latitude, longitude) {
95797 var _getSolarPosition = getSolarPosition(timestamp, latitude, longitude), azimuth = _getSolarPosition.azimuth, altitude = _getSolarPosition.altitude;
95798 var azimuthN = azimuth + Math.PI;
95799 return [
95800 -Math.sin(azimuthN),
95801 -Math.cos(azimuthN),
95802 -Math.sin(altitude)
95803 ];
95804}
95805function toJulianDay(timestamp) {
95806 return timestamp / DAY_IN_MS - 0.5 + JD1970;
95807}

Callers

nothing calls this directly

Calls 1

getSolarPositionFunction · 0.70

Tested by

no test coverage detected