% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/01_angle.R
\name{deg_to_dms}
\alias{deg_to_dms}
\title{Convert Decimal Degrees to Degrees, Minutes, and Seconds (DMS) Format}
\usage{
deg_to_dms(deg, type = "cat", digit = 5)
}
\arguments{
\item{deg}{Numeric vector of angles in decimal degrees. All values must be
between -90 and 90.}

\item{type}{Character string specifying the output format. Options are:
\itemize{
  \item \code{"cat"} (default): Prints the angle as a formatted string
    in DMS notation.
  \item \code{"mat"}: Returns a matrix with columns for sign, degrees,
    minutes, and seconds.
}}

\item{digit}{Integer specifying the number of digits to round the seconds
to. Default is \code{5}.}
}
\value{
When \code{type = "cat"}, prints the DMS string and returns
  \code{NULL} invisibly. When \code{type = "mat"}, returns a character
  matrix with columns \code{SIGN}, \code{DEG}, \code{MIN}, and \code{SEC}.
}
\description{
Converts a decimal degree angle to the Degrees-Minutes-Seconds (DMS) format
commonly used in astronomy for expressing declination and other angles.
}
\examples{
deg_to_dms(45.5042)
deg_to_dms(-12.5, type = "mat")
deg_to_dms(c(10.25, 45.5), type = "mat")
}
