pos_angle | R Documentation |
Given an angle in radians, shift it to a value between 0 and 2*pi.
pos_angle(x)
x |
Angle (IN RADIANS) |
This function was originally included in the code for the ULaval primary production model.
Corresponding angle between 0 and 2*pi (IN RADIANS)
angle_rad <- -4.3*pi
pos_angle(angle_rad)
# starting with an angle in degrees: convert to radians, calculate positive angle, convert back
angle_deg <- -365
pos_angle(angle_deg*pi/180) * 180/pi
# multiple angles
pos_angle(c(-3, -2*pi, 4*pi, 0, 5*pi, pi/2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.