declination.go (359B)
1 package sunrise 2 3 import ( 4 "math" 5 ) 6 7 // Declination calculates one of the two angles required to locate a point on 8 // the celestial sphere in the equatorial coordinate system. The ecliptic 9 // longitude parameter must be in degrees. 10 func Declination(eclipticLongitude float64) float64 { 11 return math.Asin(math.Sin(eclipticLongitude*Degree)*0.39779) / Degree 12 }