screen.screen.rotate_xy
Declaration
lua
screen.rotate_xy(x, y, target_orientation)
Description
Rotate coordinates from current orientation space to target orientation space.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
x | number | Required | — | X |
y | number | Required | — | Y |
target_orientation | integer | Required | — | Target orientation 0-3 |
Return Values
| Type | Description |
|---|---|
| integer | Rotated X |
| integer | Rotated Y |
Example
lua
local rx, ry = screen.rotate_xy(100, 200, 1)