cirrange {astrolibR} | R Documentation |
Force an angle into the range 0 <= ang < 360
cirrange(ang, radians=FALSE)
ang |
angle, scalar or vector |
radians |
indicates that angle is specified in radians rather than decimal degrees (optional, default = FALSE) |
The input angle is transformed into the range 0 to +360 degrees (or 0 to 2*pi for radians). This function is used by several other astrolib functions, and is rarely used directly by the user.
ang |
transformed angle |
Written by Michael R. Greason, Hughes STX, 10 February 1994
R adaptation by Arnab Chakraborty June 2013
new_ang <- cirrange(-40.) # returns 320.