Skip to content

Commit

Permalink
Patch 6 (#458)
Browse files Browse the repository at this point in the history
* Update Cos.md

* Update Sin.md

Co-authored-by: Technetium <[email protected]>
  • Loading branch information
niekschoemaker and technetium-cfx authored May 5, 2021
1 parent 9797605 commit dd39bb0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
14 changes: 13 additions & 1 deletion SYSTEM/Cos.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ ns: SYSTEM
float COS(float value);
```
Returns the cosine of the given number.
## Parameters
* **value**:
* **value**: The number of degrees (in degrees, not radians)
## Return value
The cosine of the given number
## Examples
```lua
-- Get the heading
local heading = GetEntityHeading(PlayerPedId())
local cos = Cos(heading)
-- equivalent in lua
local cosLua = math.cos(heading * (math.pi / 180))
```
14 changes: 13 additions & 1 deletion SYSTEM/Sin.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ ns: SYSTEM
float SIN(float value);
```
Returns the sine of the given number.
## Parameters
* **value**:
* **value**: The number of degrees (in degrees, not radians)
## Return value
The sine of the given number
## Examples
```lua
-- Get the heading
local heading = GetEntityHeading(PlayerPedId())
local sin = Sin(heading)
-- equivalent in lua
local sinLua = math.sin(heading * (math.pi / 180))
```

0 comments on commit dd39bb0

Please sign in to comment.