Commit 488aa158 authored by Milian Wolff's avatar Milian Wolff
Browse files

Fix compile with clang: isnan is in the std namespace when including cmath.

parent 4855ab76
......@@ -180,7 +180,7 @@ QTime KHolidays::SunRiseSet::utcSunrise(const QDate &date, double latitude, doub
double hourAngle = calcHourAngleSunrise(latitude, solarDec);
double delta = longitude + radToDeg(hourAngle);
QTime timeUTC(0, 0);
if (isnan(delta))
if (std::isnan(delta))
return timeUTC;
timeUTC = timeUTC.addSecs((720 - (4.0 * delta) - eqTime) * 60);
return QTime(timeUTC.hour(),
......@@ -199,7 +199,7 @@ QTime KHolidays::SunRiseSet::utcSunset(const QDate &date, double latitude, doubl
double hourAngle = -calcHourAngleSunrise(latitude, solarDec);
double delta = longitude + radToDeg(hourAngle);
QTime timeUTC(0, 0);
if (isnan(delta))
if (std::isnan(delta))
return timeUTC;
timeUTC = timeUTC.addSecs((720 - (4.0 * delta) - eqTime) * 60);
return QTime(timeUTC.hour(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment