Point

arcade.Point (Class)

A 2D point with x and y coordinates.

Instance Members

arcade
x: Float

The x coordinate of this point.


arcade
y: Float

The y coordinate of this point.


arcade
setToPolar(azimuth: Float, ?radius: Float = 1, ?asDegrees: Bool = false): Void

Sets the x and y values of this Point based on polar coordinates.

Name Type Default Description
azimuth Float The angle in radians (or degrees if asDegrees is true).
radius Float 1 The distance from the origin.
asDegrees Bool false Whether the azimuth is given in degrees (true) or radians (false).

arcade
new(x: Float, y: Float): Void

Creates a new Point instance.

Name Type Description
x Float The x coordinate.
y Float The y coordinate.

Private Members

arcade
degToRad(deg: Float): Float

Converts degrees to radians.

Name Type Description
deg Float The angle in degrees.
Returns Description
Float The angle in radians.