Point

class Point

represents a point in a 2d space

Summary


Properties from Point

string
type = "Point"
number
x = 0
number
y = 0

Public Properties


type point.js:21
type: string = "Point"

string

the shape type (used internally)

x point.js:7
x: number = 0

number

the position of the point on the horizontal axis

y point.js:14
y: number = 0

number

the position of the point on the vertical axis

Public Methods


clone point.js:64
clone() → {Point}

clone this Point

Returns:
Type Description
Point

new Point

equals point.js:46
equals(x: number | Point | Vector2d, y: number) → {boolean}

return true if this point is equal to the given point

Parameters:
Name Type Attributes Description
x number | Point | Vector2d
y number

<optional>

Returns:
Type Description
boolean
set point.js:34
set(x: number, y: number) → {Point}

set the Point x and y properties to the given values

Parameters:
Name Type Default Description
x number 0
y number 0
Returns:
Type Description
Point

Reference to this object for method chaining


Powered by webdoc!