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 |
Classes
Members
x :Number
The x coordinate
Type:
- Number
y :Number
The y coordinate
Type:
- Number
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 |
Returns:
The distance
- Type
- Number