fixted bug where time was only ever set to sunrise or sunset #12

Merged
hunter232 merged 1 commits from main into main 2024-08-06 21:03:21 -04:00
hunter232 commented 2024-08-02 12:17:35 -04:00 (Migrated from github.com)

calucation of daytime and night time fractions were being done using integer division resulting in either a 0 or 1.
-change currentMinutes type from int to double, so that floating point division would be used.
-pulled out day time and night time fractions into their own doubles for clarity.
-type cast return values of calculateWorldTime from double to long to maintain previous structure.

calucation of daytime and night time fractions were being done using integer division resulting in either a 0 or 1. -change currentMinutes type from int to double, so that floating point division would be used. -pulled out day time and night time fractions into their own doubles for clarity. -type cast return values of calculateWorldTime from double to long to maintain previous structure.
hunter232 commented 2024-08-02 12:26:11 -04:00 (Migrated from github.com)

should have included this in the first comment...
compiled? - yes
loaded in papermc? - yes
fixed issue? - tested at 11:00, sun was over head( a bit to the east) instead of at horizon.

should have included this in the first comment... compiled? - yes loaded in papermc? - yes fixed issue? - tested at 11:00, sun was over head( a bit to the east) instead of at horizon.
Jack1424 commented 2024-08-06 21:02:48 -04:00 (Migrated from github.com)

I tested this and it does seem to resolve #11. Thanks for the help!

I tested this and it does seem to resolve #11. Thanks for the help!
Sign in to join this conversation.
No description provided.