rad0to2pi
- ssapy.utils.rad0to2pi(angles)[source][source]
Normalize angles in radians to the range [0, 2π].
Parameters:
- angles (float or numpy array):
A single angle in radians or an array of angles in radians.
Negative angles will be adjusted to fall within the range [0, 2π].
Returns:
- float or numpy array:
The normalized angle(s) in radians within the range [0, 2π].
Example:
rad0to2pi(-1.0) -> 5.283185307179586 rad0to2pi(np.array([-1.0, 3.0])) -> array([5.28318531, 3.0])