Celestine API Documentation - v0.2.0
    Preparing search index...

    Function midpoint

    • Calculate the midpoint between two longitudes.

      Parameters

      • lon1: number

        First ecliptic longitude in degrees

      • lon2: number

        Second ecliptic longitude in degrees

      Returns number

      Midpoint longitude in degrees (0-360)

      Takes the midpoint of the shorter arc. Handles 0°/360° boundary correctly.

      midpoint(0, 90)     // 45
      midpoint(350, 10) // 0 (midpoint of 20° arc crossing 0°)
      midpoint(90, 270) // 180 or 0 (either midpoint is valid for opposition)