Commit 3486a5f4 authored by Guillaume Seguin's avatar Guillaume Seguin

Cleanup

parent f4525e45
......@@ -35,9 +35,9 @@ def trackball(p1x, p1y, p2x, p2y, r):
d = map(lambda x, y: x - y, p1, p2)
t = math.sqrt(sum(map(lambda x: x * x, d))) / (2.0 * TRACKBALLSIZE)
if (t > 1.0):
if t > 1.0:
t = 1.0
if (t < -1.0):
if t < -1.0:
t = -1.0
phi = 2.0 * math.asin(t)
......
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