Add a comment on cosH bounds
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user