Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
1eba6c76
Commit
1eba6c76
authored
Mar 06, 2008
by
Dan Kegel
Committed by
Alexandre Julliard
Mar 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: wintab.c: use atan2 instead of atan.
parent
81e0ef44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
27 deletions
+6
-27
wintab.c
dlls/winex11.drv/wintab.c
+6
-27
No files found.
dlls/winex11.drv/wintab.c
View file @
1eba6c76
...
...
@@ -742,35 +742,14 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
static
int
figure_deg
(
int
x
,
int
y
)
{
int
rc
;
float
angle
;
if
(
y
!=
0
)
{
rc
=
(
int
)
10
*
(
atan
(
(
FLOAT
)
abs
(
y
)
/
(
FLOAT
)
abs
(
x
))
/
(
3
.
1415
/
180
));
if
(
y
>
0
)
{
if
(
x
>
0
)
rc
+=
900
;
else
rc
=
2700
-
rc
;
}
else
{
if
(
x
>
0
)
rc
=
900
-
rc
;
else
rc
+=
2700
;
}
}
else
{
if
(
x
>=
0
)
rc
=
900
;
else
rc
=
2700
;
}
angle
=
atan2
((
float
)
y
,
(
float
)
x
);
angle
+=
M_PI_2
;
if
(
angle
<=
0
)
angle
+=
2
*
M_PI
;
return
rc
;
return
(
0
.
5
+
(
angle
*
1800
.
0
/
M_PI
))
;
}
static
int
get_button_state
(
int
curnum
)
...
...
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