Skip to content

Commit dd39bb0

Browse files
Patch 6 (citizenfx#458)
* Update Cos.md * Update Sin.md Co-authored-by: Technetium <[email protected]>
1 parent 9797605 commit dd39bb0

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

SYSTEM/Cos.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@ ns: SYSTEM
88
float COS(float value);
99
```
1010
11+
Returns the cosine of the given number.
1112
1213
## Parameters
13-
* **value**:
14+
* **value**: The number of degrees (in degrees, not radians)
1415
1516
## 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+
```

SYSTEM/Sin.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@ ns: SYSTEM
88
float SIN(float value);
99
```
1010
11+
Returns the sine of the given number.
1112
1213
## Parameters
13-
* **value**:
14+
* **value**: The number of degrees (in degrees, not radians)
1415
1516
## 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+
```

0 commit comments

Comments
 (0)