Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 778 Bytes

moon-phase.md

File metadata and controls

28 lines (19 loc) · 778 Bytes

//astronomy/io.github.cosinekitty.astronomy/moonPhase

moonPhase

fun moonPhase(time: Time): Double

Returns the Moon's phase as an angle from 0 to 360 degrees.

This function determines the phase of the Moon using its apparent ecliptic longitude relative to the Sun, as seen from the center of the Earth. Certain values of the angle have conventional definitions:

  • 0 = new moon
  • 90 = first quarter
  • 180 = full moon
  • 270 = third quarter

Return

The angle as described above, a value in the range 0..360 degrees.

Parameters

time The date and time of the observation.