Compare commits

..

No commits in common. "1c06750b2dea3850a570897c65a1620b41f4e97f" and "158bd8f62b02d23ccb95923cd675356942021a97" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View file

@ -4,7 +4,7 @@
<groupId>eu.m724</groupId> <groupId>eu.m724</groupId>
<artifactId>wtapi</artifactId> <artifactId>wtapi</artifactId>
<version>0.8.0</version> <version>0.8.0-SNAPSHOT</version>
<properties> <properties>
<maven.compiler.source>17</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>
@ -69,7 +69,7 @@
<scm> <scm>
<developerConnection>scm:git:git@git.m724.eu:Minecon724/wtapi.git</developerConnection> <developerConnection>scm:git:git@git.m724.eu:Minecon724/wtapi.git</developerConnection>
<tag>wtapi-0.8.0</tag> <tag>wtapi-0.5</tag>
</scm> </scm>
</project> </project>

View file

@ -27,13 +27,13 @@ public class ApproximateTwilightTimeProvider extends CacheableTwilightTimeProvid
double n2 = tan(latRad) * tan(declination); double n2 = tan(latRad) * tan(declination);
double hourAngle = acos(n1 - n2); double hourAngle = acos(n1 - n2);
double longitudeEffect = 4 * toDegrees(hourAngle); double hourAngleDeg = 4 * toDegrees(hourAngle);
// sunrise = 720 - 4 * (coordinates.longitude + hourAngleDeg) - equationOfTime // sunrise = 720 - 4 * (coordinates.longitude + hourAngleDeg) - equationOfTime
// sunset = 720 - 4 * (coordinates.longitude - hourAngleDeg) - equationOfTime // sunset = 720 - 4 * (coordinates.longitude - hourAngleDeg) - equationOfTime
double solarNoon = 720 - 4 * coordinates.longitude - equationOfTime; double solarNoon = 720 - 4 * coordinates.longitude - equationOfTime;
double sunrise = solarNoon - longitudeEffect; double sunrise = solarNoon - hourAngleDeg;
double sunset = solarNoon + longitudeEffect; double sunset = solarNoon + hourAngleDeg;
return new Twilight( return new Twilight(
cache.date(), cache.date(),