Computes the two times of day when the sun is at a given angle above (or below) the horizon.
It's not strictly sunrise or sunset, but the maths is closely related and it's really handy to use your functions.
I realise you're not actively working on this library, but I have a use case in a project that depends on it (https://github.com/tidbyt/pixlet).
Someone wants to display the start and end time of Shabbat. The end time is when the sun is 8.5 degrees below the horizon. This function makes it easy to compute that.
The alternative would be to add this logic just to pixlet. It can use all of the same functions as they're exported by your library. But it seems general and related enough to belong in the library where others could use them.
Included tests to ensure this gives consistent answers to SunriseSunset.
Computes the two times of day when the sun is at a given angle above (or below) the horizon.
It's not strictly sunrise or sunset, but the maths is closely related and it's really handy to use your functions.
I realise you're not actively working on this library, but I have a use case in a project that depends on it (https://github.com/tidbyt/pixlet).
Someone wants to display the start and end time of Shabbat. The end time is when the sun is 8.5 degrees below the horizon. This function makes it easy to compute that.
The alternative would be to add this logic just to pixlet. It can use all of the same functions as they're exported by your library. But it seems general and related enough to belong in the library where others could use them.
Included tests to ensure this gives consistent answers to SunriseSunset.