Sin
Docslocal retval = Sin(value)Description
Returns the sine of the given number.
Parameters
| Name | Type | Description |
|---|---|---|
value | float | The number of degrees (in degrees, not radians) |
Returns
floatReturns a floating-point number.
Examples
Official
-- Get the heading
local heading = GetEntityHeading(PlayerPedId())
local sin = Sin(heading)
-- equivalent in lua
local sinLua = math.sin(heading * (math.pi / 180))