Files
Marius Schamschula 03fa933ace sunwait: fix compile and link issues.
git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@148366 d073be05-634f-4543-b044-5fe20cf6d1d6
2016-05-05 14:59:35 +00:00

12 lines
512 B
Diff

--- sunriset.cpp.orig 2015-06-01 08:25:41.000000000 -0500
+++ sunriset.cpp 2016-05-05 08:11:03.000000000 -0500
@@ -92,7 +92,7 @@
/* compute the diurnal arc that the sun traverses to reach the specified altitide altit: */
double cost = (sind(altitude) - sind(pRun->latitude) * sind(sdec)) / (cosd(pRun->latitude) * cosd(sdec));
- if (abs(cost) < 1.0)
+ if (fabs(cost) < 1.0)
diurnalArc = 2*acosd(cost)/15.0; /* Diurnal arc, hours */
else if (cost>=1.0)
diurnalArc = 0.0; // Polar Night