grahan — the open-source sky engine
    Preparing search index...

    Function formatDms

    • Format decimal degrees as D°MM′SS″, rounding seconds to secondsDecimals places (default 0) and carrying overflow.

      Parameters

      • deg: number
      • secondsDecimals: number = 0

      Returns string

      formatDms(23.7681, 1); // "23°46′05.2″"