Class: Point

Point(x, y)

new Point(x, y)

Class representing a point on the canvas
Parameters:
Name Type Description
x Number The x coordinate of the point
y Number The y coordinate of the point
Source:

Classes

Point

Members

x :Number

The x coordinate
Type:
  • Number
Source:

y :Number

The y coordinate
Type:
  • Number
Source:

Methods

distance(x) → {Number}

Calculates the distance between two points using the pythagorian theorem
Parameters:
Name Type Description
x Point The point to calculate the distance to
Source:
Returns:
The distance
Type
Number