diff --git a/src/sun.c b/src/sun.c index 1a37daa..630fc97 100644 --- a/src/sun.c +++ b/src/sun.c @@ -55,8 +55,11 @@ static float calcSun(int year, int month, int day, float latitude, (cosDec * cos((M_PI / 180.0f) * latitude)); if (cosH > 1) { + // the sun never rises at this location on the specified date return 0; - } else if (cosH < -1) { + } + if (cosH < -1) { + // the sun never sets at this location on the specified date return 0; }