Commit d541b1f4 authored by Taddeus Kroes's avatar Taddeus Kroes

Corrected faulty import of PI.

parent a495e74e
#!/usr/bin/env python
from events import TapEvent, FlickEvent, RotateEvent, PinchEvent, PanEvent
import time
from math import atan2, PI
from math import atan2, pi
from threading import Thread
from OSC import OSCServer
......@@ -137,11 +137,11 @@ class MultiTouchListener(object):
p.set_angle(atan2(p.y - cy, p.x - cx))
da = p.angle_diff()
# Assert that angle is in [-PI, PI]
if da > PI:
da -= 2 * PI
elif da < PI:
da += 2 * PI
# Assert that angle is in [-pi, pi]
if da > pi:
da -= 2 * pi
elif da < pi:
da += 2 * pi
rotation += da
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment