Stores a 2D floating point coordinate.

### `@:value({ Y : 0, X : 0 })inlineadd(X:Float = 0, Y:Float = 0):FlxPoint`

Adds to the coordinates of this point.

Parameters:

`X` Amount to add to x Amount to add to y

Returns:

This point.

### `addPoint(point:FlxPoint):FlxPoint`

Adds the coordinates of another point to the coordinates of this point.

Parameters:

`point` The point to add to this point

Returns:

This point.

### `inlineaddToFlash(FlashPoint:Point):Point`

Helper function, just increases the values of the specified Flash point by the values of this point.

Parameters:

`Point` Any Point.

Returns:

A reference to the altered point parameter.

### `angleBetween(point:FlxPoint):Float`

Calculates the angle between this and another point. 0 degrees points straight up.

Parameters:

`point` The other point.

Returns:

The angle in degrees, between -180 and 180.

### `inlineceil():FlxPoint`

Rounds x and y using Math.ceil()

### `inlinecopyFrom(point:FlxPoint):FlxPoint`

Helper function, just copies the values from the specified point.

Parameters:

`point` Any FlxPoint.

Returns:

A reference to itself.

### `inlinecopyFromFlash(FlashPoint:Point):FlxPoint`

Helper function, just copies the values from the specified Flash point.

Parameters:

`Point` Any Point.

Returns:

A reference to itself.

### `copyTo(?point:FlxPoint):FlxPoint`

Helper function, just copies the values from this point to the specified point.

Parameters:

`Point` Any FlxPoint.

Returns:

A reference to the altered point parameter.

### `inlinecopyToFlash(FlashPoint:Point):Point`

Helper function, just copies the values from this point to the specified Flash point.

Parameters:

`Point` Any Point.

Returns:

A reference to the altered point parameter.

### `destroy():Void`

Necessary for IFlxDestroyable.

### `distanceTo(point:FlxPoint):Float`

Calculate the distance to another point.

Parameters:

`AnotherPoint` A FlxPoint object to calculate the distance to.

Returns:

The distance between the two points as a Float.

### `inlineequals(point:FlxPoint):Bool`

Function to compare this FlxPoint to another.

Parameters:

`point` The other FlxPoint to compare to this one.

Returns:

True if the FlxPoints have the same x and y value, false otherwise.

### `inlinefloor():FlxPoint`

Rounds x and y using Math.floor()

### `inlineinCoords(RectX:Float, RectY:Float, RectWidth:Float, RectHeight:Float):Bool`

Returns true if this point is within the given rectangular block

Parameters:

`RectX` The X value of the region to test within The Y value of the region to test within The width of the region to test within The height of the region to test within

Returns:

True if the point is within the region, otherwise false

### `inlineinRect(Rect:FlxRect):Bool`

Returns true if this point is within the given rectangular block

Parameters:

`Rect` The FlxRect to test within

Returns:

True if pointX/pointY is within the FlxRect, otherwise false

### `put():Void`

Add this FlxPoint to the recycling pool.

### `inlineputWeak():Void`

Add this FlxPoint to the recycling pool if it's a weak reference (allocated via weak()).

### `rotate(Pivot:FlxPoint, Angle:Float):FlxPoint`

Rotates this point clockwise in 2D space around another point by the given angle.

Parameters:

`Pivot` The pivot you want to rotate this point around Rotate the point by this many degrees clockwise.

Returns:

A FlxPoint containing the coordinates of the rotated point.

### `inlineround():FlxPoint`

Rounds x and y using Math.round()

### `scale(k:Float):FlxPoint`

Scale this point.

Parameters:

`k` scale coefficient

Returns:

scaled point

Available since

4.1.0

.

### `@:value({ Y : 0, X : 0 })set(X:Float = 0, Y:Float = 0):FlxPoint`

Set the coordinates of this point.

Parameters:

`X` The X-coordinate of the point in space. The Y-coordinate of the point in space.

Returns:

This point.

### `@:value({ Y : 0, X : 0 })inlinesubtract(X:Float = 0, Y:Float = 0):FlxPoint`

Subtracts from the coordinates of this point.

Parameters:

`X` Amount to subtract from x Amount to subtract from y

Returns:

This point.

### `inlinesubtractFromFlash(FlashPoint:Point):Point`

Helper function, just decreases the values of the specified Flash point by the values of this point.

Parameters:

`Point` Any Point.

Returns:

A reference to the altered point parameter.

### `subtractPoint(point:FlxPoint):FlxPoint`

Subtracts the coordinates of another point from the coordinates of this point.

Parameters:

`point` The point to subtract from this point

Returns:

This point.

### `inlinetoString():String`

Convert object to readable string name. Useful for debugging, save games, etc.

### `inlinetoVector():FlxVector`

Function to get a `FlxVector` from this `FlxPoint`

Available since

4.3.0

.

### `inlinetransform(matrix:Matrix):FlxPoint`

Applies transformation matrix to this point

Parameters:

`matrix` transformation matrix

Returns:

transformed point

### `@:value({ Y : 0, X : 0 })staticinlineget(X:Float = 0, Y:Float = 0):FlxPoint`

Recycle or create a new FlxPoint. Be sure to put() them back into the pool after you're done with them!

Parameters:

`X` The X-coordinate of the point in space. The Y-coordinate of the point in space.

Returns:

This point.

### `@:value({ Y : 0, X : 0 })staticinlineweak(X:Float = 0, Y:Float = 0):FlxPoint`

Recycle or create a new FlxPoint which will automatically be released to the pool when passed into a flixel function.

Parameters:

`X` The X-coordinate of the point in space. The Y-coordinate of the point in space.

Returns:

This point.
{"ft_lang_label":"__label__en","ft_lang_prob":0.50698006,"math_prob":0.98075074,"size":4378,"snap":"2019-43-2019-47","text_gpt3_token_len":1074,"char_repetition_ratio":0.22153635,"word_repetition_ratio":0.31723028,"special_character_ratio":0.19689356,"punctuation_ratio":0.188902,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9951574,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-18T19:47:04Z\",\"WARC-Record-ID\":\"<urn:uuid:cdbc6790-03df-4a68-90a6-73642a2f160b>\",\"Content-Length\":\"31814\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fb66c386-59bd-43d8-ac0b-0ece0455d45d>\",\"WARC-Concurrent-To\":\"<urn:uuid:0868b865-9124-4350-8f4a-d5addcdf0cfa>\",\"WARC-IP-Address\":\"128.199.52.182\",\"WARC-Target-URI\":\"http://api.haxeflixel.com/flixel/math/FlxPoint.html\",\"WARC-Payload-Digest\":\"sha1:OAVAKRNKEFISMQ6SIX3DXSFVNUZWUTDP\",\"WARC-Block-Digest\":\"sha1:EGWPC2RXFXFO3QKBFC4ON7FEEZVSECZJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496669813.71_warc_CC-MAIN-20191118182116-20191118210116-00098.warc.gz\"}"}