Class: Point
An object which represents a point in two dimensions. Point
instances are frozen and cannot be
modified.
Constructor
new Point(x, y)
Create a new Point
instance.
Parameters
x
{number}y
{number}
Methods
equalTo(that) → {boolean}
Returns whether two instances have the same value.
Parameters
that
{Point}Another point
translate(thatopt, xopt, yopt) → {Point}
Create a new point translated relative to this instance.
Note: Use either point.translate(that)
or point.translate(x, y)
Parameters
that
{Point}Translate by this argument's position
x
{number}X value to translate
y
{number}Y value to translate
Returns {Point}
New translated instance