MCPcopy Create free account
hub / github.com/pytorch/tutorials / angle_normalize

Function angle_normalize

advanced_source/pendulum.py:276–277  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

274
275
276def angle_normalize(x):
277 return ((x + torch.pi) % (2 * torch.pi)) - torch.pi
278
279
280######################################################################

Callers 1

_stepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected