Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
multitouch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
multitouch
Commits
d541b1f4
Commit
d541b1f4
authored
Apr 24, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected faulty import of PI.
parent
a495e74e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/multitouch/touch.py
src/multitouch/touch.py
+6
-6
No files found.
src/multitouch/touch.py
View file @
d541b1f4
#!/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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment