forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcos.lcdoc
More file actions
56 lines (35 loc) · 1.08 KB
/
cos.lcdoc
File metadata and controls
56 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Name: cos
Type: function
Syntax: the cos of <angle>
Syntax: cos(<angle>)
Summary:
<return|Returns> the cosine of an angle (in <radian|radians>).
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
cos(pi)
Example:
the cos of 0
Example:
put cos(the startAngle of graphic 3) into field "Cosine"
Parameters:
angle:
A positive or negative number, or an expression that evaluates to a
number.
Returns:
The <cos> <function> <return|returns> a number between -1 and 1.
Description:
Use the <cos> <function> to find the cosine of an angle.
The <cos> <function> repeats every `2 * pi` <radian|radians>:
`cos(x) = cos(x + 2 * pi)`, for any value of `x`.
The <cos> <function> requires its input to be in <radian|radians>. To
provide an angle in <degree|degrees>, use the following
<custom function>:
function cosInDegrees angleInDegrees
return cos(angleInDegrees * pi / 180)
end cosInDegrees
References: pi (constant), function (glossary),
radian (glossary), custom function (glossary), return (glossary),
degree (glossary)
Tags: math