Convert radians to degrees
stm_rad_to_degrees.Rd
stm_rad_to_degrees()
converts a value in radians to degrees. The
result can be rounded to a specified number of decimal places.
Value
The value in degrees, rounded to the specified number of decimal
places if digits
is provided.
Details
The function converts the given angle in radians to degrees by multiplying
by 180 / pi
. If digits
is specified, the result is rounded
to that number of decimal places.
Examples
stm_rad_to_degrees(pi)
#> [1] 180
stm_rad_to_degrees(c(pi/2, pi, 2 * pi))
#> [1] 90 180 360
stm_rad_to_degrees(pi/180)
#> [1] 1