Constructor
new Point(x, y)
Create a new point.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | The X Coordinate. |
y |
number | The Y Coordinate. |
Methods
add(p)
Add another Point to this point.
Parameters:
Name | Type | Description |
---|---|---|
p |
Point | The Point to be added. |
rotate(degrees, center)
Rotate the point in the coordinate system around another point.
Parameters:
Name | Type | Description |
---|---|---|
degrees |
number | The nunber of degrees clockwise to rotate. |
center |
Point | The point around which to rotate. |
vary(v) → {Point}
Vary the point location (both x and y) by up to v.
Parameters:
Name | Type | Description |
---|---|---|
v |
number | The number of pixels to vary the point. |
Returns:
This point, after being modified.
- Type
- Point