mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-05-24 08:45:55 -04:00
Added comments to Java demos.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user