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

    Function angularDistance

    • Calculate the shortest angular distance between two points on the ecliptic

      Returns the smallest angle between two positions, taking into account the circular nature of the ecliptic (0° = 360°).

      Parameters

      • angle1: number

        First angle in degrees

      • angle2: number

        Second angle in degrees

      Returns number

      Angular distance in degrees (0-180)

      angularDistance(10, 50)    // 40
      angularDistance(350, 10) // 20 (not 340 - shortest distance)
      angularDistance(0, 180) // 180
      angularDistance(270, 90) // 180