Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
77fe488a
Commit
77fe488a
authored
Aug 18, 2014
by
Shuai Meng
Committed by
Alexandre Julliard
Aug 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Implemented Sin.
parent
f97491cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
global.c
dlls/vbscript/global.c
+8
-2
api.vbs
dlls/vbscript/tests/api.vbs
+27
-0
No files found.
dlls/vbscript/global.c
View file @
77fe488a
...
...
@@ -681,8 +681,14 @@ static HRESULT Global_Cos(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
static
HRESULT
Global_Sin
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
HRESULT
hres
;
double
d
;
hres
=
to_double
(
arg
,
&
d
);
if
(
FAILED
(
hres
))
return
hres
;
return
return_double
(
res
,
sin
(
d
));
}
static
HRESULT
Global_Tan
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
77fe488a
...
...
@@ -1115,4 +1115,31 @@ Call ok(getVT(Cos(True)) = "VT_R8", "getVT(Cos(True)) = " & getVT(Cos(True)))
Call
ok
(
Approch
(
Cos
(
CByte
(
255
)),
-
0.8623
),
"Cos(CByte(255)) = "
&
Cos
(
CByte
(
255
)))
Call
ok
(
getVT
(
Cos
(
CByte
(
255
)))
=
"VT_R8"
,
"getVT(Cos(CByte(255))) = "
&
getVT
(
Cos
(
CByte
(
255
))))
Call
ok
(
Approch
(
Sin
(
Empty
),
0
),
"Sin(Empty) = "
&
Sin
(
Empty
))
Call
ok
(
getVT
(
Sin
(
Empty
))
=
"VT_R8"
,
"getVT(Sin(Empty)) = "
&
getVT
(
Sin
(
Empty
)))
Call
ok
(
Approch
(
Sin
(
PI
/
6
),
1
/
2
),
"Sin(PI / 6) = "
&
Sin
(
PI
/
6
))
Call
ok
(
getVT
(
Sin
(
PI
/
6
))
=
"VT_R8"
,
"getVT(Sin(PI / 6)) = "
&
getVT
(
Sin
(
PI
/
6
)))
Call
ok
(
Approch
(
Sin
(
CCur
(
PI
/
4
)),
Sqr
(
2
)
/
2
),
"Sin(CCur(PI / 4)) = "
&
Sin
(
CCur
(
PI
/
4
)))
Call
ok
(
getVT
(
Sin
(
CCur
(
PI
/
4
)))
=
"VT_R8"
,
"getVT(Sin(CCur(PI / 4))) = "
&
getVT
(
Sin
(
CCur
(
PI
/
4
))))
Call
ok
(
Approch
(
Sin
(
CSng
(
PI
/
3
)),
Sqr
(
3
)
/
2
),
"Sin(CSng(PI / 3)) = "
&
Sin
(
CSng
(
PI
/
3
)))
Call
ok
(
getVT
(
Sin
(
CSng
(
PI
/
3
)))
=
"VT_R8"
,
"getVT(Sin(CSng(PI))) = "
&
getVT
(
Sin
(
CSng
(
PI
))))
Call
ok
(
Approch
(
Sin
(
PI
/
2
),
1
),
"Sin(0) = "
&
Sin
(
PI
/
2
))
Call
ok
(
getVT
(
Sin
(
PI
/
2
))
=
"VT_R8"
,
"getVT(Sin(PI / 2)) = "
&
getVT
(
Sin
(
PI
/
2
)))
Call
ok
(
Approch
(
Sin
(
PI
),
0
),
"Sin(PI) = "
&
Sin
(
PI
))
Call
ok
(
getVT
(
Sin
(
PI
))
=
"VT_R8"
,
"getVT(Sin(PI)) = "
&
getVT
(
Sin
(
PI
)))
Call
ok
(
Approch
(
Sin
(
5
*
PI
/
4
),
-
Sqr
(
2
)
/
2
),
"Sin(5 * PI / 4) = "
&
Sin
(
5
*
PI
/
4
))
Call
ok
(
getVT
(
Sin
(
5
*
PI
/
4
))
=
"VT_R8"
,
"getVT(Sin(5 * PI / 4)) = "
&
getVT
(
Sin
(
5
*
PI
/
4
)))
Call
ok
(
Approch
(
Sin
(
3
*
PI
/
2
),
-
1
),
"Sin(3 * PI / 2) = "
&
Sin
(
3
*
PI
/
2
))
Call
ok
(
getVT
(
Sin
(
3
*
PI
/
2
))
=
"VT_R8"
,
"getVT(Sin(3 * PI / 2)) = "
&
getVT
(
Sin
(
3
*
PI
/
2
)))
Call
ok
(
Approch
(
Sin
(
2
*
PI
),
0
),
"Sin(2 * PI) = "
&
Sin
(
2
*
PI
))
Call
ok
(
getVT
(
Sin
(
2
*
PI
))
=
"VT_R8"
,
"getVT(Sin(2 * PI)) = "
&
getVT
(
Sin
(
2
*
PI
)))
Call
ok
(
Approch
(
Sin
(
"-32768"
),
-
0.9278
),
"Sin(
""
-32768
""
) = "
&
Sin
(
"-32768"
))
Call
ok
(
getVT
(
Sin
(
"-32768"
))
=
"VT_R8"
,
"getVT(Sin(
""
-32768
""
)) = "
&
getVT
(
Sin
(
"-32768"
)))
Call
ok
(
Approch
(
Sin
(
False
),
0
),
"Sin(False) = "
&
Sin
(
False
))
Call
ok
(
getVT
(
Sin
(
False
))
=
"VT_R8"
,
"getVT(Sin(False)) = "
&
getVT
(
Sin
(
False
)))
Call
ok
(
Approch
(
Sin
(
True
),
-
0.84147
),
"Sin(True) = "
&
Sin
(
True
))
Call
ok
(
getVT
(
Sin
(
True
))
=
"VT_R8"
,
"getVT(Sin(True)) = "
&
getVT
(
Sin
(
True
)))
Call
ok
(
Approch
(
Sin
(
CByte
(
255
)),
-
0.5063
),
"Sin(CByte(255)) = "
&
Sin
(
CByte
(
255
)))
Call
ok
(
getVT
(
Sin
(
CByte
(
255
)))
=
"VT_R8"
,
"getVT(Sin(CByte(255))) = "
&
getVT
(
Sin
(
CByte
(
255
))))
Call
reportSuccess
()
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