% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/01_angle.R
\name{hms_to_deg}
\alias{hms_to_deg}
\title{Convert Hours, Minutes, and Seconds (HMS) to Decimal Degrees}
\usage{
hms_to_deg(h, m, s, digit = 5)
}
\arguments{
\item{h}{Numeric or character. The hours component. If a single character
string is provided (e.g., \code{"03h15m30s"}), the hours, minutes, and
seconds are parsed automatically, and \code{m} and \code{s} should be
omitted.}

\item{m}{Numeric. The minutes component. Optional when \code{h} is a
string.}

\item{s}{Numeric. The seconds component. Optional when \code{h} is a
string.}

\item{digit}{Integer. Number of decimal places to round the result to.
Default is \code{5}.}
}
\value{
Numeric. The angle in decimal degrees.
}
\description{
Converts an angle expressed in Hours-Minutes-Seconds (HMS) format to
decimal degrees. Accepts either separate numeric arguments or a single
formatted string.
}
\examples{
hms_to_deg(h = 3, m = 15, s = 30)
hms_to_deg(h = 3, m = 15, s = 30.123)
hms_to_deg(h = "03h15m30s")
}
