MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / normalize

Function normalize

PythonAPI/examples/microsim.py:16–22  ·  view source on GitHub ↗
(angle)

Source from the content-addressed store, hash-verified

14import numpy as np
15
16def normalize(angle):
17 if angle >= np.deg2rad(180):
18 return angle - np.deg2rad(360)
19 elif angle < -180:
20 return angle + np.deg2rad(360)
21 else:
22 return angle
23
24if __name__ == '__main__':
25

Callers 3

microsim.pyFile · 0.70
FindPositionInNodeFunction · 0.50
rationalClass · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected