-
Notifications
You must be signed in to change notification settings - Fork 0
a2d.Position
extends a2d.Vector
Defined in types.js
|
a2d.Position(x, y) Position
|
| **[add](#add)** (diff) Adds coordinates. | |
| *a2d.Position* | **[clone](#clone)** Returns a Position object with the same coordinates |
| _number_ | **[distanceTo](#distanceTo)** (position2) Get the distance between two points |
| **[divide](#divide)** (diff) Divides this position by another | |
| _boolean_ | **[is](#is)** (position2) Checks if two positions are equal |
| **[isInside](#isInside)** (rectangle) Checks if this position is inside a given rectangle. | |
| _boolean_ | **[not](#not)** (position2) Checks if two positions are not equal |
| **[scale](#scale)** (_scale) Scales coordinates. | |
| **[substract](#substract)** (diff) Subtracts coordinates. | |
| **[subtract](#subtract)** (diff) Subtracts other position from this one |
a2d.Position(x, y)
Position
{number} x
{number} y
{a2d.Position} diff
--
{a2d.Position} clone
Returns a Position object with the same coordinates
{a2d.Position}
a clone of this Position object
--
{number} distanceTo (position2)
Get the distance between two points
{a2d.Position} position2
{number}
The distance between the two points
--
divide (diff)
Divides this position by another
{a2d.Position} diff
--
{boolean} is (position2)
Checks if two positions are equal
{a2d.Position} position2
{boolean}
true if the positions are the same
--
isInside (rectangle)
Checks if this position is inside a given rectangle.
{a2d.Rectangle} rectangle
--
{boolean} not (position2)
Checks if two positions are not equal
{a2d.Position} position2
{boolean}
true if the positions are not the same
--
scale (_scale)
Scales coordinates.
{a2d.Position} _scale
--
substract (diff)
Subtracts coordinates.
{a2d.Position} diff
In favor of a2d.Position#subtract
--
subtract (diff)
Subtracts other position from this one
{a2d.Position} diff