DeaD_EyE icon

Moon position in °

DeaD_EyE | PRO | 07/06/22 02:00:07 PM UTC (Edited) | 0 ⭐ | 665 👁️ | Never ⏰ | []
Python |

350 B

|

None

|

0 👍

/

0 👎

# not sure if this is correct
 
import datetime
 
def position(now=None):
   if now is None:
      now = datetime.datetime.now()
 
   days = (now - datetime.datetime(2001, 1, 1)) / datetime.timedelta(days=1)
   lunations = float.fromhex("0x1.a29b0e8eb915ep-3") + days * float.fromhex("0x1.1568432488c6ap-5")
 
   return round((lunations % 1) * 360)
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎