Skip to content

Commit

Permalink
Keep c++ 11 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
kappen committed Oct 9, 2018
1 parent 30040ae commit 564429a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
9 changes: 9 additions & 0 deletions SunCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@

#include "SunCalc.h"

const float SunCalc::sunrise = 0.833;
const float SunCalc::sunriseEnd = 0.3;
const float SunCalc::twilight = 6.0;
const float SunCalc::nauticalTwilight = 12.0;
const float SunCalc::night = 18.0;
const float SunCalc::goldenHour = -6.0;
const double SunCalc::PI = 3.141592653589793;


SunCalc::SunCalc(const Date &date, double latitude, double longitude)
{
_date = date;
Expand Down
14 changes: 7 additions & 7 deletions SunCalc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
class SunCalc
{
public:
static const float sunrise = 0.833;
static const float sunriseEnd = 0.3;
static const float twilight = 6.0;
static const float nauticalTwilight = 12.0;
static const float night = 18.0;
static const float goldenHour = -6.0;
static const float sunrise;
static const float sunriseEnd;
static const float twilight;
static const float nauticalTwilight;
static const float night;
static const float goldenHour;

private:
static const double PI=3.141592653589793;
static const double PI;

double _latitude;
double _longitude;
Expand Down

0 comments on commit 564429a

Please sign in to comment.