Moon phase: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle No edit summary |
imported>StDoodle mNo edit summary |
||
Line 17: | Line 17: | ||
<p> | <p> | ||
* Grimace = moon_phase() / 2 | * Grimace = moon_phase() / 2 | ||
* Ronald = moon_phase() | * Ronald = moon_phase() modulo 8 | ||
Now compare the number for each to the following: | Now compare the number for each to the following: | ||
* 0 new moon | * 0 new moon |
Revision as of 23:29, 19 April 2010
needs(code_samples);
Function Syntax
int moon_phase()
Returns the moon phase, between 0 and 15.
- Grimace = moon_phase() / 2
- Ronald = moon_phase() modulo 8
Now compare the number for each to the following:
- 0 new moon
- 1 waxing crescent
- 2 first quarter
- 3 waxing gibbous
- 4 full moon
- 5 waning gibbous
- 6 third quarter
- 7 waning crescent
Note that this function does not return any information regarding the mini-moon.
CLI Equivalent
The CLI command "moon" gives text output that includes moon phases.
See Also
More Information
See this thread for more information.