From 31d687324957bbf43de3257efb41a58ab27ea2b5 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Tue, 24 Sep 2024 18:39:58 +0200 Subject: [PATCH] Actually, this name is better --- ...meProvider.java => ApproximateTwilightTimeProvider.java} | 2 +- ...ilightTimeTest.java => ApproximateTwilightTimeTest.java} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/eu/m724/wtapi/provider/twilight/{SimpleTwilightTimeProvider.java => ApproximateTwilightTimeProvider.java} (96%) rename src/test/java/eu/m724/wtapi/twilight/{SimpleTwilightTimeTest.java => ApproximateTwilightTimeTest.java} (91%) diff --git a/src/main/java/eu/m724/wtapi/provider/twilight/SimpleTwilightTimeProvider.java b/src/main/java/eu/m724/wtapi/provider/twilight/ApproximateTwilightTimeProvider.java similarity index 96% rename from src/main/java/eu/m724/wtapi/provider/twilight/SimpleTwilightTimeProvider.java rename to src/main/java/eu/m724/wtapi/provider/twilight/ApproximateTwilightTimeProvider.java index 32e6f87..790fc11 100644 --- a/src/main/java/eu/m724/wtapi/provider/twilight/SimpleTwilightTimeProvider.java +++ b/src/main/java/eu/m724/wtapi/provider/twilight/ApproximateTwilightTimeProvider.java @@ -13,7 +13,7 @@ import static java.lang.Math.*; * Usually off by a few minutes, except the Poles which, during polar days, are up to few hours inaccurate * Adapted from: https://gml.noaa.gov/grad/solcalc/solareqns.PDF */ -public class SimpleTwilightTimeProvider extends TwilightTimeProvider { +public class ApproximateTwilightTimeProvider extends TwilightTimeProvider { @Override public Twilight calculateTwilightTime(LocalDate date, Coordinates coordinates) { int dayOfYear = date.getDayOfYear() - 1; // -1 because we have to start from zero diff --git a/src/test/java/eu/m724/wtapi/twilight/SimpleTwilightTimeTest.java b/src/test/java/eu/m724/wtapi/twilight/ApproximateTwilightTimeTest.java similarity index 91% rename from src/test/java/eu/m724/wtapi/twilight/SimpleTwilightTimeTest.java rename to src/test/java/eu/m724/wtapi/twilight/ApproximateTwilightTimeTest.java index b1c633f..b15d861 100644 --- a/src/test/java/eu/m724/wtapi/twilight/SimpleTwilightTimeTest.java +++ b/src/test/java/eu/m724/wtapi/twilight/ApproximateTwilightTimeTest.java @@ -2,13 +2,13 @@ package eu.m724.wtapi.twilight; import eu.m724.wtapi.object.Coordinates; import eu.m724.wtapi.object.Twilight; -import eu.m724.wtapi.provider.twilight.SimpleTwilightTimeProvider; +import eu.m724.wtapi.provider.twilight.ApproximateTwilightTimeProvider; import eu.m724.wtapi.provider.twilight.TwilightTimeProvider; import org.junit.Test; import java.time.LocalDate; -public class SimpleTwilightTimeTest { +public class ApproximateTwilightTimeTest { /** * Acceptable discrepancy in minutes */ @@ -16,7 +16,7 @@ public class SimpleTwilightTimeTest { @Test public void approximateTest() { - TwilightTimeProvider provider = new SimpleTwilightTimeProvider(); + TwilightTimeProvider provider = new ApproximateTwilightTimeProvider(); testLocation(provider, 26, 6, 2023, 53.123394, 23.0864867, 122, 1139); testLocation(provider, 13, 11, 2040, 45.432427, -122.3899276, 907, 1481);