Skip to content

Commit

Permalink
Fixed type warnings in integer expressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cosinekitty committed Nov 4, 2023
1 parent fbda1d6 commit fb38511
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions generate/template/astronomy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions source/c/astronomy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fb38511

Please sign in to comment.