Convert radians to hours, minutes, and seconds

Share:

Description

Angular conversion from radians to hours, minutes, and seconds

Usage

1
rad2hms(rad = 1, places = 1)

Arguments

rad

Decimal radians

places

Number of decimal places in seconds term (0:6)

Value

Fixed-format string with hours, minutes, and seconds separated by colons.

Author(s)

Andrew Harris

See Also

rad2dms, dms2rad, hms2rad

Examples

1
2
3
rad2hms(2.44)
rad2hms(hms2rad(c('10:04:5.12', '27,04,5.3', '-3:0:0')), places=3)
rad2hms(266.5 * pi/180) # from degrees to hms