You use a sine function to model the percentage of the Moonâs face that is lit by the Sun every night. At full moon, all of the Moonâs face is lit (100%). At New Moon, none of the moonâs face is lit (0%).
The output of your function expresses percentages as decimals. For example, 5% = 0.05.