Added comments to Java demos.

This commit is contained in:
Don Cross
2022-05-02 13:38:31 -04:00
parent 90aa6ed369
commit 5df9b03e7c
7 changed files with 18 additions and 5 deletions

View File

@@ -2,6 +2,13 @@ package io.github.cosinekitty.astronomy.demo;
import io.github.cosinekitty.astronomy.*;
public class MoonPhase {
/**
* Display Moon phase information and the next 10 quarter phases.
*
* @param time
* The date and time for which to display Moon phase information,
* and when to initiate a search for the subsequent quarter phases.
*/
public static int run(Time time) {
// Calculate the Moon's ecliptic phase angle,
// which ranges from 0 to 360 degrees.

View File

@@ -8,7 +8,7 @@ public class Positions {
};
/**
* Display equatorial and horizontal coordinates of solar system bodies.
* Print a table of solar system body positions in equatorial and horizontal coordinates.
*
* @param observer
* The geographic location for which to calculate positions.

View File

@@ -2,6 +2,12 @@ package io.github.cosinekitty.astronomy.demo;
import io.github.cosinekitty.astronomy.*;
public class Seasons {
/**
* Print the times of the equinoxes and solstices for a calendar year.
*
* @param year
* The calendar year value for which to find equinoxes and solstices.
*/
public static int run(int year) {
SeasonsInfo seasons = Astronomy.seasons(year);
System.out.printf("March equinox : %s%n", seasons.getMarchEquinox());