Atan2 (Function) — Skript

Addon: Skript · Category: Function

Syntax

atan2(x: number, y: number) :: number

Description

Similar to <a href='#atan'>atan</a>, but requires two coordinates and returns values from -180 to 180. The returned angle is measured counterclockwise in a standard mathematical coordinate system (x to the right, y to the top).

Examples

atan2(0, 1) = 0
atan2(10, 0) = 90
atan2(-10, 5) = -63.4349

View source