Atan2
7/14/25Less than 1 minute
Mathf.Atan2(number y, number x)
Returns the angle in radians whose Tan is y/x.
Parameters:
| Name | Type | Description |
|---|---|---|
| y | number | y |
| x | number | x |
Returns:
| type | Description |
|---|---|
| number | The angle between the x-axis and a 2D vector starting at zero and terminating at (x,y). |
Usage
---@type number
local y;
---@type number
local x;
local val0 = Mathf:Atan2(y, x)
