This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//uncomment the line below to use 'double', or else leave it commented to use 'float' | |
//#define DOUBLE_PREC | |
#ifdef DOUBLE_PREC | |
typedef double fp; | |
#else | |
typedef float fp; | |
#endif | |
//use 'fp' instead of 'float' or 'double' in your code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: | |
Almanac for Computers, 1990 | |
published by Nautical Almanac Office | |
United States Naval Observatory | |
Washington, DC 20392 | |
Inputs: | |
day, month, year: date of sunrise/sunset | |
latitude, longitude: location for sunrise/sunset | |
zenith: Sun's zenith for sunrise/sunset |