Changeset View
Changeset View
Standalone View
Standalone View
src/sunriseset.cpp
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | This file is part of the kholidays library. | 2 | This file is part of the kholidays library. | ||
3 | 3 | | |||
4 | Adapted from the Javascript found at https://www.esrl.noaa.gov/gmd/grad/solcalc | 4 | Adapted from the Javascript found at https://www.esrl.noaa.gov/gmd/grad/solcalc | ||
5 | which is in the public domain. | 5 | which is in the public domain. | ||
6 | 6 | | |||
7 | Copyright (c) 2012 Allen Winter <winter@kde.org> | 7 | SPDX-FileCopyrightText: 2012 Allen Winter <winter@kde.org> | ||
8 | 8 | | |||
9 | This library is free software; you can redistribute it and/or | 9 | SPDX-License-Identifier: LGPL-2.0-or-later | ||
10 | modify it under the terms of the GNU Library General Public | | |||
11 | License as published by the Free Software Foundation; either | | |||
12 | version 2 of the License, or (at your option) any later version. | | |||
13 | | ||||
14 | This library is distributed in the hope that it will be useful, | | |||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | | |||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | |||
17 | Library General Public License for more details. | | |||
18 | | ||||
19 | You should have received a copy of the GNU Library General Public License | | |||
20 | along with this library; see the file COPYING.LIB. If not, write to | | |||
21 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | | |||
22 | Boston, MA 02110-1301, USA. | | |||
23 | */ | 10 | */ | ||
24 | 11 | | |||
25 | #include "sunriseset.h" | 12 | #include "sunriseset.h" | ||
26 | #include <cmath> | 13 | #include <cmath> | ||
27 | static const double PI = 3.14159265358979323846; | 14 | static const double PI = 3.14159265358979323846; | ||
28 | static const double MaxLat = 89.99; | 15 | static const double MaxLat = 89.99; | ||
29 | static const double MaxLong = 179.99; | 16 | static const double MaxLong = 179.99; | ||
30 | 17 | | |||
▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines |