File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,20 @@ ns: SYSTEM
8
8
float COS (float value);
9
9
```
10
10
11
+ Returns the cosine of the given number.
11
12
12
13
## Parameters
13
- * **value**:
14
+ * **value**: The number of degrees (in degrees, not radians)
14
15
15
16
## Return value
17
+ The cosine of the given number
18
+
19
+ ## Examples
20
+ ```lua
21
+ -- Get the heading
22
+ local heading = GetEntityHeading(PlayerPedId())
23
+ local cos = Cos(heading)
24
+
25
+ -- equivalent in lua
26
+ local cosLua = math.cos(heading * (math.pi / 180))
27
+ ```
Original file line number Diff line number Diff line change @@ -8,8 +8,20 @@ ns: SYSTEM
8
8
float SIN (float value);
9
9
```
10
10
11
+ Returns the sine of the given number.
11
12
12
13
## Parameters
13
- * **value**:
14
+ * **value**: The number of degrees (in degrees, not radians)
14
15
15
16
## Return value
17
+ The sine of the given number
18
+
19
+ ## Examples
20
+ ```lua
21
+ -- Get the heading
22
+ local heading = GetEntityHeading(PlayerPedId())
23
+ local sin = Sin(heading)
24
+
25
+ -- equivalent in lua
26
+ local sinLua = math.sin(heading * (math.pi / 180))
27
+ ```
You can’t perform that action at this time.
0 commit comments