Ah, it's that old integer-division gotcha again! When you write "360/365" in
Java that results in an integer value with the remainder from the division thrown away. In other words, in this case it's zero, which isn't what you wanted. You want a double value there, so write "360.0/365.0" instead.
The other gotcha which you haven't hit yet is that the Math.sin() and other trignometric functions want parameters in radians, not degrees. Check the documentation for the Math class to find out how to convert degrees to radians.