Fixed type warnings in integer expressions.

This commit is contained in:
Don Cross
2023-11-04 16:20:09 -04:00
parent fbda1d6420
commit fb385114cd
2 changed files with 4 additions and 4 deletions

View File

@@ -1312,10 +1312,10 @@ astro_utc_t Astronomy_UtcFromTime_Julian(astro_time_t time)
const int64_t h = 5 * g + 2;
utc.day = (h % 153) / 5 + 1;
utc.month = ((h / 153 + 2) % 12) + 1;
utc.year = e / 1461 - 4716 + (12 + 2 - utc.month) / 12;
utc.year = (int)(e / 1461 - 4716 + (12 + 2 - utc.month) / 12);
if (cycles > 0)
utc.year -= cycles * 4;
utc.year -= (int)(cycles * 4);
double ignore;
double dayFraction = modf(julianDatePlus12Hours, &ignore);

View File

@@ -1318,10 +1318,10 @@ astro_utc_t Astronomy_UtcFromTime_Julian(astro_time_t time)
const int64_t h = 5 * g + 2;
utc.day = (h % 153) / 5 + 1;
utc.month = ((h / 153 + 2) % 12) + 1;
utc.year = e / 1461 - 4716 + (12 + 2 - utc.month) / 12;
utc.year = (int)(e / 1461 - 4716 + (12 + 2 - utc.month) / 12);
if (cycles > 0)
utc.year -= cycles * 4;
utc.year -= (int)(cycles * 4);
double ignore;
double dayFraction = modf(julianDatePlus12Hours, &ignore);