| Property | Value |
|---|---|
| Native Name | COS |
| Hash | 0xD0FFB162F40A139C |
| Return Type | float |
| Parameters | value (float) |
Description: Returns the cosine of the given number.
Parameters
value(float) — The number of degrees (in degrees, not radians)
Examples
-- Get the heading
local heading = GetEntityHeading(PlayerPedId())
local cos = Cos(heading)
-- equivalent in lua
local cosLua = math.cos(heading * (math.pi / 180))