Skip to content
Narta Xaymar Dirks edited this page Oct 28, 2026 · 7 revisions

Blitz3DBlitzPlusBlitzBasic

ATan2

ATan2:Float32 floata:Float32, floatb:Float32
Parameter Mode Type Default Description
floata In Float32 required The vertical distance (y).
floatb In Float32 required The horizontal distance (x).

Returns: The angle in degrees.

Description

Returns the angle of the point (b, a) seen from the origin, in degrees from -180 to 180. Note the order: the vertical distance a comes first. 0 points along positive x, 90 along positive y.

Examples

Print ATan2(1, 1)
Print ATan2(0, -1)
45.0
180.0

Related Commands

ACos, ASin, ATan, ByteSwap 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally