Skip to content
ClassCollision & Math@public

FlxPoint

Stores a two-dimensional floating-point coordinate.

ts
export declare class FlxPoint implements PointLike

Constructors

ts
constructor(x?: number, y?: number)

Constructs a new instance of the FlxPoint class

ParameterTypeDescription
xnumber-
ynumber-

Properties

PropertyModifiersTypeDescription
x-number-
y-number-

Methods

copyFrom()

ts
copyFrom(point: PointLike): this

Copies another point into this instance.

Parameters:

ParameterTypeDescription
pointPointLike-

Returns: this

copyFromFlash()

ts
copyFromFlash(point: PointLike): this

Browser replacement for copying from flash.geom.Point.

Parameters:

ParameterTypeDescription
pointPointLike-

Returns: this

copyTo()

ts
copyTo<T extends PointLike>(point: T): T

Copies this point into the supplied mutable target.

Parameters:

ParameterTypeDescription
pointT-

Returns: T

copyToFlash()

ts
copyToFlash<T extends PointLike>(point: T): T

Browser replacement for copying to flash.geom.Point.

Parameters:

ParameterTypeDescription
pointT-

Returns: T

make()

ts
make(x?: number, y?: number): this

Reuses this point with new coordinates.

Parameters:

ParameterTypeDescription
xnumber-
ynumber-

Returns: this

Released under the MIT License.