Point(x, y)
Class representing a point.
Constructor
Create a point.
- Source:
- es2015-classes.js, line 2
Parameters:
Name | Type | Description |
---|---|---|
x | number | The x value. |
y | number | The y value. |
Methods
fromString(str) → {Point}
Convert a string containing two comma-separated numbers into a point.
- Source:
- es2015-classes.js, line 33
Parameters:
Name | Type | Description |
---|---|---|
str | string | The string containing two comma-separated numbers. |
Returns:
A Point object.
- Type
- Point
getX() → {number}
Get the x value.
- Source:
- es2015-classes.js, line 16
Returns:
The x value.
- Type
- number
getY() → {number}
Get the y value.
- Source:
- es2015-classes.js, line 24
Returns:
The y value.
- Type
- number