direction in [0,360)
newDirection in [0,360)
tolerance = 22
examples:
newDirection = 0
if newDirection < tolerance
direction belongs (360-newDirection+tolerance, 360] or [0,newDirection+tolerance)
else
if newDirection > 360-tolerance
direction belongs [newDirection-tolerance, 360] or [0,newDirection+tolerance-360)
else
direction belongs [newDirection-tolerance, newDirection+tolerance]