Files
sun/vendor/github.com/nathan-osman/go-sunrise/anomaly.go
T
2026-10-23 14:11:51 +00:00

16 lines
282 B
Go

package sunrise
import (
"math"
)
// SolarMeanAnomaly calculates the angle of the sun relative to the earth for
// the specified Julian day.
func SolarMeanAnomaly(d float64) float64 {
v := math.Remainder(357.5291+0.98560028*(d-J2000), 360)
if v < 0 {
v += 360
}
return v
}