         }
     }
     
+    
+    /**
+     Computes the hours of twilights
+     
+     - parameter sunAltitude: The altitude of the Sun below, or at the, horizon. See TwilightSunAltitude enum for default values.
+     - parameter coordinates: The coordinates on Earth where the twilights should be computed.
+     
+     - returns: A length in (Julian) Days.
+     */
     func twilights(forSunAltitude sunAltitude: Degree, coordinates: GeographicCoordinates) -> (rise: Hour?, set: Hour?, error: TwilightError?) {
         // ALgorithm is using positive eastward longitude.
 

        
        // Compute the diurnal arc that the Sun traverses to reach the specified altitude altit:
        
        let sinAlt = sin(sunAltitude.inRadians)
        let sinLat = sin(coordinates.latitude.inRadians)
        let sinDec = sin(sun.equatorialCoordinates.declination.inRadians)
        let cosLat = cos(coordinates.latitude.inRadians)
        let cosDec = cos(sun.equatorialCoordinates.declination.inRadians)
        
        let cost = (sinAlt - sinLat * sinDec) / (cosLat * cosDec)
        

            error = .alwaysAboveAltitude
        }
        else {
            rise = tSouth - Degree(acos(cost)/DEG2RAD).inHours
            set  = tSouth + Degree(acos(cost)/DEG2RAD).inHours
        }
        
        return (rise, set, error)
