TODO
- Clear suggestion incosistent naming
- JSDoc
- converted indent to space
- documenting methods
About
A simple 2D point
Attributes
Name | Type | Description |
---|---|---|
x | Real | The x component of the point. The x-coordinate of the point in GameMaker is centered at 0, where positive values extend to the right side of the origin. |
y | Real | The y component of the point. The y-coordinate of the point in GameMaker is based on an origin at 0. Unlike a typical Cartesian plane, positive values extend below the x-axis origin. |
Methods
is_inside
Parameters
Returns
Boolean
Description
This method will return
true
ifself
is within the rectangle defined by_p1
and_p2
; otherwise, it returnsfalse
.
Example
// copy code here
minus
Parameters
Name | Type | Description |
---|---|---|
_p | Point2D | Point2D used as translation |
Returns
None
Description
What
Example
// copy code here
plus
Parameters
Name | Type | Description |
---|---|---|
_p | Point2D | Point2D used as translation |
Returns
None
Description
What
Example
// copy code here
rminus
Parameters
Name | Type | Description |
---|---|---|
_p | Point2D | Point2D used as translation |
Returns
Point2D
Description
Unlike minus, it will create a new Point2D instead of modifying
self
Example
// copy code here
rplus
Parameters
Name | Type | Description |
---|---|---|
_p | Point2D | Point2D used as translation |
Returns
Point2D
Description
Unlike plus, it will create a new Point2D instead of modifying
self
Example
// copy code here