Credit "borrowed" code used for angle normalization

This commit is contained in:
Matt McWilliams 2022-11-11 10:19:31 -05:00
parent 66aa5d1712
commit 9e11d95447
1 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,8 @@ def is_close (point, points) :
return True return True
return False return False
# taken from
# https://gist.github.com/phn/1111712/35e8883de01916f64f7f97da9434622000ac0390
def normalize_angle (num, lower=0.0, upper=360.0, b=False): def normalize_angle (num, lower=0.0, upper=360.0, b=False):
"""Normalize number to range [lower, upper) or [lower, upper]. """Normalize number to range [lower, upper) or [lower, upper].
Parameters Parameters