From 9372b9c7b3ec8fce22aab5b2f6c19eb7f9146709 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Tue, 24 Sep 2024 19:51:42 +0200 Subject: [PATCH] Find a better name for the variable --- .../impl/approximate/ApproximateTwilightTimeProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/m724/wtapi/provider/twilight/impl/approximate/ApproximateTwilightTimeProvider.java b/src/main/java/eu/m724/wtapi/provider/twilight/impl/approximate/ApproximateTwilightTimeProvider.java index ead0be3..c8ee7ad 100644 --- a/src/main/java/eu/m724/wtapi/provider/twilight/impl/approximate/ApproximateTwilightTimeProvider.java +++ b/src/main/java/eu/m724/wtapi/provider/twilight/impl/approximate/ApproximateTwilightTimeProvider.java @@ -27,13 +27,13 @@ public class ApproximateTwilightTimeProvider extends CacheableTwilightTimeProvid double n2 = tan(latRad) * tan(declination); double hourAngle = acos(n1 - n2); - double hourAngleDeg = 4 * toDegrees(hourAngle); + double longitudeEffect = 4 * toDegrees(hourAngle); // sunrise = 720 - 4 * (coordinates.longitude + hourAngleDeg) - equationOfTime // sunset = 720 - 4 * (coordinates.longitude - hourAngleDeg) - equationOfTime double solarNoon = 720 - 4 * coordinates.longitude - equationOfTime; - double sunrise = solarNoon - hourAngleDeg; - double sunset = solarNoon + hourAngleDeg; + double sunrise = solarNoon - longitudeEffect; + double sunset = solarNoon + longitudeEffect; return new Twilight( cache.date(),