parameters: (a, b, t)
docstring: Interpolates between `a` and `b` assuming they lie on a circle.
docstring_summary: Interpolates between `a` and `b` assuming they lie on a circle.
docstring_tokens: Interpolates between a and b assuming they lie on a circle .
function: def circle_mix(a, b, t):
    """Interpolates between `a` and `b` assuming they lie on a circle."""
    case = np.argmin([np.abs(b - a), np.abs(b - a - 1), np.abs(b - a + 1)])
    if case == 0:
      result = np.float32(mix(a, b, t))
    elif case == 1:
      result = np.float32(mix(a, b - 1, t)) % np.float32(1.0)
    else:  # case == 2
      result = np.float32(mix(a, b + 1, t)) % np.float32(1.0)
    if result == 1.0:  # Somehow, result can be 1.0 at this point.
      return np.float32(0.0)  # We make sure that in this case we return 0.0.
    else:
      return result
function_tokens: def circle_mix ( a , b , t ) : case = np . argmin ( [ np . abs ( b - a ) , np . abs ( b - a - 1 ) , np . abs ( b - a + 1 ) ] ) if case == 0 : result = np . float32 ( mix ( a , b , t ) ) elif case == 1 : result = np . float32 ( mix ( a , b - 1 , t ) ) % np . float32 ( 1.0 ) else : # case == 2 result = np . float32 ( mix ( a , b + 1 , t ) ) % np . float32 ( 1.0 ) if result == 1.0 : # Somehow, result can be 1.0 at this point. return np . float32 ( 0.0 ) # We make sure that in this case we return 0.0. else : return result