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