def mod_2pi(th):
    u = (2 * pi) / th
    return 2 * pi * (u - floor(u + 0.5))

# Given clothoid k(s) = k0 + k1 s, compute th1 - th0 of chord from s = -.5
# to .5.
dataset/ETHPy150Open google/roboto/third_party/spiro/curves/clothoid.py/mod_2pi/swapped operands of `/`