Native referenceRedM

SIN

0x0BADBFA3B172435F BUILTIN
FUNCTION SIGNATURE
float SIN(float value);
Property Value
Native Name SIN
Hash 0x0BADBFA3B172435F
Return Type float
Build 1207
Parameters value (float)

Description: Returns the sine of the given number.

Parameters

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

Usage

Lua (Direct):

local result = Sin(value)

Lua (Hash):

local result = Citizen.InvokeNative(0x0BADBFA3B172435F, value)

Examples

-- Get the heading
local heading = GetEntityHeading(PlayerPedId())
local sin = Sin(heading)

-- equivalent in lua
local sinLua = math.sin(heading * (math.pi / 180))
Back to BUILTIN