The Lab
BUILTIN native

COS

returns float1 parambuild 1207

Returns the cosine of value, with the angle expressed in degrees as is usual in RAGE script math.

Signature

C
float COS(float value); // 0xD0FFB162F40A139C b1207

Parameters

#NameType
1valuefloat

Facts

Facts about COS
Name
COS
Hash
0xD0FFB162F40A139C
Namespace
Returns
float
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0xD0FFB162F40A139C, -- COS
  0.0, -- float value
  Citizen.ResultAsFloat()
)
print(result)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0xD0FFB162F40A139C", // COS
  0.0, // float value
  Citizen.resultAsFloat()
);
console.log(result)
C#
float result = Function.Call<float>((Hash)0xD0FFB162F40A139C, // COS
  0.0f // float value
);
All BUILTIN natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.