~kennylevinsen/wlsunset

e6062a94408c8006d5439123c08a662af146435e — Kenny Levinsen 8 days ago edf3595
WIP todo
1 files changed, 1 insertions(+), 0 deletions(-)

M color_math.c
M color_math.c => color_math.c +1 -0
@@ 48,6 48,7 @@ static double sun_hour_angle(double latitude_rad, double declination_rad, double

static time_t hour_angle_to_time(double longitude, double eqtime, double hour_angle) {
	// https://www.esrl.noaa.gov/gmd/grad/solcalc/solareqns.PDF
	// TODO: convert to radians
	return isnan(hour_angle) ? -1 : (720 - 4 * (longitude + hour_angle) - eqtime) * 60;
}