Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 447 Bytes

Cos.md

File metadata and controls

27 lines (21 loc) · 447 Bytes
ns
SYSTEM

COS

// 0xD0FFB162F40A139C 0x00238FE9
float COS(float value);

Returns the cosine of the given number.

Parameters

  • value: The number of degrees (in degrees, not radians)

Return value

The cosine of the given number

Examples

-- Get the heading
local heading = GetEntityHeading(PlayerPedId())
local cos = Cos(heading)

-- equivalent in lua
local cosLua = math.cos(heading * (math.pi / 180))