Skip to content

Commit

Permalink
Upgraded to ESLint 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlo Dapor committed Apr 13, 2024
1 parent f56db8b commit 23013b9
Show file tree
Hide file tree
Showing 90 changed files with 1,935 additions and 1,908 deletions.
19 changes: 7 additions & 12 deletions src/Astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,13 @@ function kdayOnOrAfter (k: WeekDay, jdn: number): number {
/**
* Return the Julian day number (JDN) of the k-day nearest the given Julian day number (JDN).
* k=0 means Sunday, k=1 means Monday, and so on.
* @param {WeekDay} k a wek day
* @param {number} jdn Julian day number (JDN)
* @returns {number} resulting Julian day number (JDN)
* @param k a wek day
* @param jdn Julian day number (JDN)
* @returns resulting Julian day number (JDN)
*/
/*
function kdayNearest(k: WeekDay, jdn: number): number {
return kdayOnOrBefore(k, jdn + 3);
}
*/

/**
* Return the Julian day number (JDN) of the k-day after the given Julian day number (JDN).
Expand Down Expand Up @@ -192,7 +190,7 @@ function degrees (theta: number): number {
*/
function fixAngle (alpha: number): number {
return alpha - 360.0 * Math.floor(alpha / 360.0)
};
}

/**
* Range reduce angle in radians
Expand All @@ -201,7 +199,7 @@ function fixAngle (alpha: number): number {
*/
function fixAngleRadians (alpha: number): number {
return alpha - 2 * Math.PI * Math.floor(alpha / (2 * Math.PI))
};
}

/**
* Sine of an angle in degrees
Expand Down Expand Up @@ -635,11 +633,7 @@ function jhms (jdn: number): number[] {
const j2: number = jdn + 0.5
const ij: number = (j2 - Math.floor(j2)) * 86400.0 + 0.5

return [
Math.floor(ij / 3600),
Math.floor(ij / 60 % 60),
Math.floor(ij % 60)
]
return [Math.floor(ij / 3600), Math.floor((ij / 60) % 60), Math.floor(ij % 60)]
}

/**
Expand Down Expand Up @@ -1611,6 +1605,7 @@ export {
jhms,
jwday,
julianCenturies, // only to be tested!
kdayNearest,
kdayOnOrAfter,
lunarAltitude, // only to be tested!
lunarDistance, // only to be tested!
Expand Down

0 comments on commit 23013b9

Please sign in to comment.