Class: Point

Point(x, y)

Define a point with cartesian coordinates.

Constructor

new Point(x, y)

Create a new point.

Parameters:
Name Type Description
x number

The X Coordinate.

y number

The Y Coordinate.

Source:

Methods

add(p)

Add another Point to this point.

Parameters:
Name Type Description
p Point

The Point to be added.

Source:

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.

Source:

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.

Source:
Returns:

This point, after being modified.

Type
Point