% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/01_angle.R
\name{deg_to_hms}
\alias{deg_to_hms}
\title{Convert Decimal Degrees to Hours, Minutes, and Seconds (HMS) Format}
\usage{
deg_to_hms(deg, type = "cat", digit = 5)
}
\arguments{
\item{deg}{Numeric vector of angles in decimal degrees. Values can range
from 0 to 360.}

\item{type}{Character string specifying the output format. Options are:
\itemize{
  \item \code{"cat"} (default): Prints a formatted string
    (e.g., \code{3H0M0S}).
  \item \code{"mat"}: Returns a matrix with columns for hours, minutes,
    and seconds.
}}

\item{digit}{Integer specifying the number of decimal places to round
seconds to. Default is \code{5}.}
}
\value{
When \code{type = "cat"}, prints the HMS string and returns
  \code{NULL} invisibly. When \code{type = "mat"}, returns a numeric matrix
  with columns \code{HRS}, \code{MIN}, and \code{SEC}.
}
\description{
Converts a decimal degree angle to Hours-Minutes-Seconds (HMS) format,
which is used in astronomy to express Right Ascension (RA).
}
\examples{
deg_to_hms(deg = 45)
deg_to_hms(deg = 45, type = "mat")
deg_to_hms(deg = 177.74208, digit = 3)
}
