API Docs for: 2.2.1
Show:

Point Class

Defined in: pixi/geom/Point.hx:6

The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.

Constructor

Point

(
  • x
  • y
)

Parameters:

  • x Float

    position of the point on the x axis

  • y Float

    position of the point on the y axis

Item Index

Methods

Properties

Methods

clone

() Point

Creates a clone of this point

Returns:

Point:

a copy of the point

set

(
  • [x=0]
  • [y=0]
)

Sets the point to a new x and y position. If y is ommited, both x and y will be set to x.

Parameters:

  • [x=0] Float optional

    position of the point on the x axis

  • [y=0] Float optional

    position of the point on the y axis

Properties

x

Float

Default: 0

y

Float

Default: 0